April 2018
Beginner to intermediate
300 pages
7h 34m
English
To give meaning to the values on the x and y axes, we need information about the nature and type of data, and its corresponding units. We can provide this piece of information by placing axis labels with plt.xlabel() or plt.ylabel().
Let us continue with our example plot of multi-city temperatures. We shall add plt.xlabel('Temperature (°C)') and plt.ylabel('Date') to label the axes to produce the following plot:

Similar to many other Matplotlib functions involving text, it is possible to set the text properties, such as font size and color within the plt.xlabel() and plt.ylabel() functions, by passing the properties as parameters. ...
Read now
Unlock full access