import matplotlib.pyplot as plt
fig, ((ax1,ax2),(ax3,ax4)) = plt.subplots(2,2, figsize=(10,3), sharex=True, sharey=True)
plt.subplots_adjust(wspace=0.01,hspace=0)
x = [1,2,3,4,5]
y1 = [2,4,5,7,10]
y2 = [11,8,4,6,1]
ax1.plot(x,y1)
ax2.plot(x,y2)
ax3.plot(x,y1)
ax4.plot(x,y2)
ax1.set_title("axis1")
plt.suptitle("super title")
plt.show()
How to make subplots using matplotlib in python
Теги
subplots in pythonsubplots pythonpython subsplotspythonpyhtonsuplotssubpoltssubplotmatplotlibsubplots in matplotlibsubplots matplotlibmatplotlib subplotssubplots using matplotlibmake subplots in pythoncreate subplots in pythonmake subplots in matplotlibpanel chartpanel charts in pythonpanel charts matplotlibpanel plot in pythonmultiplot charts pythonsub-plotssubplots with no space inbetweensubplots with no spacessubplots with no gap