Question : show multiple plots python
Answered by : tho-michel
#One way to plot two figure at once
f = plt.figure(1)
plt.plot([1,2],[2,3])
f.show()
g = plt.figure(2)
plt.plot([2,7,3],[5,1,9])
g.show()
Source : | Last Update : Fri, 01 May 20
Question : multiple plot in one figure python
Answered by : joyous-jaguar-xvfh1zt0y0ep
import matplotlib.pyplot as plt
plt.plot(<X AXIS VALUES HERE>, <Y AXIS VALUES HERE>, 'line type', label='label here')
plt.plot(<X AXIS VALUES HERE>, <Y AXIS VALUES HERE>, 'line type', label='label here')
plt.legend(loc='best')
plt.show()
Source : https://stackoverflow.com/questions/21254472/multiple-plot-in-one-figure-in-python | Last Update : Thu, 14 May 20
Question : create multiple plots python
Answered by : syed-nayeem-ridwan
{"tags":[{"tag":"textarea","content":"# On same plot\ndf.plot(subplots=True)\nplt.show()\n# On different plot\nfig, axes = plt.subplots(2,1)\ndf['A'].plot(ax=axes[0])\ndf['B'].plot(ax=axes[0])\nplt.show()","code_language":"python"}]}
Source : | Last Update : Sun, 22 Jan 23
Question : add multiple plots to same figure matplotlib
Answered by : syed-nayeem-ridwan
{"tags":[{"tag":"textarea","content":"ax = df[\"A\"].plot()\ndf[\"B\"].plot(ax=ax)\ndf[\"C\"].plot(ax=ax)\n\nplt.show()","code_language":"typescript"}]}
Source : | Last Update : Sun, 22 Jan 23