How to Apply Grid in Graph Plot in Matplotlib
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,5,2,15,12,20]
mat.plot(x,y,marker='.',mec='r',mfc='k',ms=7,ls='solid',lw=2,c='y')
mat.grid(axis='both',ls='solid',lw=2,c='g')
fc={'family':'Times New Roman','size':20,'color':'r'}
mat.xlabel("X-Axis",fontdict=fc)
mat.ylabel("Y-Axis",fontdict=fc)
mat.title("Grid Chart",fontdict=fc)
mat.show()
We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

