tylerponticelli / intro-data-capstone-biodiversity

0 stars 0 forks source link

Use ax object to set the title #3

Open sen1 opened 6 years ago

sen1 commented 6 years ago

https://github.com/tylerponticelli/intro-data-capstone-biodiversity/blob/3b4ea4fbd6679feba67bfeedb3ac77e0f110c9f4/codeacademy/readme.txt#L150-L158

plt.title sets the title for a whole figure while ax.set_title for one subplot. Since you only have one plot in this figure, it does not really matter which one you use. A general rule of thumb is to use the ax object if it's available and to be consistent with other lines above. So use ax.set_title instead of plt.title.