●Set the network line: grid() function
plt.plot(x , color = "y" , linestyle = "--" )
plt.grid( color = "0.5" , linestyle = "-" , linewidth = "1.5" ) #Set grid lines
Common parameters grid(b, which, axis, color, linestyle, linewidth, **kwargs)
for example axis
plt.grid( axis = "y" ) # hide the grid lines of y
- add text label
Maplotlib.pyplot.text(x,y,s,**kwargs)
General Drawing Parameters |
Parameter Description |
fontsize |
font size |
ha |
horizontal alignment |
Va |
vertical alignment |
- Set title and legend
Location |
illustrate |
best |
adaptive |
upper right |
upper right |
upper left |
upper left |
lower right |
bottom right |
lower left |
lower left |
right |
Right |
center left |
middle left |
center right |
middle right |
upper center |
upper middle |
center |
The middle |
lower center |
lower middle |