9951 explained code solutions for 126 technologies


python-matplotlibHow to add grid to chart


import matplotlib.pyplot as plt
plt.plot([1,2,10,6,15,3,4])
plt.plot([4,2,11,2,1,20,25])
plt.grid(True)
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

.grid(

add and configure grid

.show()

render chart in a separate window