+ 3
How to separate two charts⁉️ [SOLVED]
I'm trying to plot two charts in one code, a 'pie' & a 'bar' charts but they overlap‼️ How to separate them ⁉️ https://code.sololearn.com/cA16a3A4A16a/?ref=app
2 odpowiedzi
+ 5
https://code.sololearn.com/ckYim3l5r49G/?ref=app
+ 5
You can use subplots
fig, axes = plt.subplots(nrows=2)
or
fig, axes = plt.subplots(ncols=2)
and do
s.plot(kind='pie', ax=axes[0])
s.plot(kind='bar', ax=axes[1])
https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplots.html