import numpy as np
import matplotlib.pyplot as plt
x = [0,5,9,10,15]
y = [0,1,2,3,4]
X = 1.0
plt.plot(x,y)
plt.xticks(np.arange(min(x), max(x)+1, X))
plt.show()
import numpy as np
from matplotlib import pyplot as plt
x = np.array([1, 2, 3, 4, 5, 6])
y = np.array(2 * x + 2)
z = np.array(2 * y + 1)
yticks = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]
Y = 5
plt.title('Line graph for the equation y=2x+2')
plt.xlabel('X_axis')
plt.ylabel('Y_axis')
plt.plot(x, y, linewidth=2, color='red', marker='.', markersize=7)
plt.yticks(np.arange(min(yticks), max(yticks) + 1, Y))
plt.grid()
plt.show()
plt.xticks(start, stop, step))
plt.yticks(np.arange(start,stop,step))
plt.xticks(np.arange(0,10),np.arange(10,20))
locs, labels = yticks()
>>> yticks(np.arange(0, 1, step=0.2))
>>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue'])
>>> yticks([0, 1, 2], ['January', 'February', 'March'],
... rotation=45)
>>> yticks([])