To show the grid line at each tick, add
plt.grid(True)
For example:
import matplotlib.pyplot as plt points = [ (0, 10), (10, 20), (20, 40), (60, 100), ] x = list(map(lambda x: x[0], points)) y = list(map(lambda x: x[1], points)) plt.scatter(x, y) plt.grid(True) plt.show()

In addition, you can customize the style (for example, a solid line instead of a dashed line), add:
plt.rc('grid', linestyle="-", color='black')
For example:
import matplotlib.pyplot as plt points = [ (0, 10), (10, 20), (20, 40), (60, 100), ] x = list(map(lambda x: x[0], points)) y = list(map(lambda x: x[1], points)) plt.rc('grid', linestyle="-", color='black') plt.scatter(x, y) plt.grid(True) plt.show()

Jossef Harush Jun 18 '16 at 12:00 2016-06-18 12:00
source share