November 2018
Beginner to intermediate
214 pages
5h 2m
English
We can also apply a background grid. It will lay down gridlines, which will show the reader and the viewer that each of the ticks extends far away from the axis. This is often useful if you want the viewer to be able to draw direct numerical values by looking at pieces of the grid or of their plot. So, it's important for your viewer to be able to actually look at a point or a piece of a line and draw out the numerical value of the grid lines, as shown here:
# Gridlinesnums = np.arange(0,10,0.1)plt.plot(nums, np.sin(nums))plt.grid()
We will get the following output:

Like any other set of lines in Matplotlib, ...
Read now
Unlock full access