How to separate two chartsā‰ļø [SOLVED] | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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

17th Mar 2021, 12:21 PM
Janusz Bujak šŸ‡µšŸ‡± šŸ‡ŗšŸ‡¦
Janusz Bujak šŸ‡µšŸ‡± šŸ‡ŗšŸ‡¦ - avatar
2 Respostas
+ 5
https://code.sololearn.com/ckYim3l5r49G/?ref=app
17th Mar 2021, 12:39 PM
visph
visph - avatar
+ 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
17th Mar 2021, 12:48 PM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar