![]() When I run it without ax.set_title(), it works fine. Not Protected", fontsize=16)įig.legend(protected_sold.index, loc='upper left', prop=) gridspeckw : dict, optional Dict with keywords passed to the. I’m trying to make two pie charts side by side (1,2) and have one main title on top ( fig.suptitle()) and two smaller titles for each ax ( ax.set_title()).įig.suptitle("Protected v. Just in case you were not seeing word title anywhere. For the font size you can use size/fontsize: from matplotlib import pyplot as plt fig plt.figure () plt.plot (data) fig.suptitle ('test title', fontsize20) plt.xlabel ('xlabel', fontsize18) plt.ylabel ('ylabel', fontsize16) fig.savefig ('test.jpg') For globally setting title and label sizes, mpl.rcParams contains axes.titlesize and axes. The title of subplot is actually annotation 'text'. ![]() You only have to change the text of the title later on when it suits you. Everything works as expected except ax.set_title(). For those coming from Google for adjusting the title position on a scatter matrix, you can simply set the y parameter to a value slightly lower than 1: plt.suptitle ('My Title', y0.92) Share. This will take care of calculating the right x and y for the annotation so that you don't have to figure it out yourself like in jayveesea answer. Labels and titles that depends on which row or column are specified as usual via a subplots own frame setting. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |