Adding a title

To describe the information of the plotted data, we can give a title to our figure. This can be done simply with the command plt.title(yourtitle):

plt.title("Daily temperature of 3 cities in the second week of December")

Again, we can specify text style properties. Here we set the title font to be larger than other labels:

plt.title("Daily temperature of 3 cities in the second week of December", size=14, fontweight='bold')

The following is the plot with title added:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.193.221