Python Matplotlib Program for Subplot
Machine Learning courses with 100+ Real-time projects Start Now!!
Program 1
import matplotlib.pyplot as mat
x=[0,1,2,3,4,5]
y=[0,1,4,9,16,25]
x1=[0,10,20,30,40,50]
y1=[0,20,10,40,10,50]
x2=[0,10,20,30,40,50]
y2=[0,20,10,40,10,50]
x3=[0,10,20,30,40,50]
y4=[0,20,10,40,10,50]
mat.subplot(3,2,1)
mat.plot(x,y,marker='.',mfc='r',mec='k',ms=10)
mat.subplot(3,2,2)
mat.plot(x1,y1,marker='.',mfc='y',mec='r',ms=10)
mat.subplot(3,2,3)
mat.plot(x2,y1,marker='.',mfc='y',mec='r',ms=10)
mat.subplot(3,2,4)
mat.plot(x3,y4,marker='.',mfc='y',mec='r',ms=10)
mat.title("Line Chart of SubPlot")
mat.xlabel("X-Axis")
mat.ylabel("Y-Axis")
mat.show()
You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

