![]() ![]() legend.fontsize - Fontsize for legends ( plt.legend(), fig.legend()).ytick.labelsize - Fontsize of the tick labels.xtick.labelsize - Fontsize of the tick labels.figure.titlesize - Size of the figure title ( Figure.suptitle()).axes.titlesize - Fontsize of the axes title.axes.labelsize - Fontsize of the x and y labels. ![]() See this section of the customizing matplotlib page for more details.Ī complete list of the rcParams keys can be retrieved via (), but for adjusting font sizes you have (italics quoted from here) You can also create (or modify) a matplotlibrc file which shares the format axes.labelsize = 16ĭepending on which matplotlibrc file you modify these changes will be used for only the current working directory, for all working directories which do not have a matplotlibrc file, or for all working directories which do not have a matplotlibrc file and where no other matplotlibrc file has been specified. If you have a style sheet at /path/to/mpl_configdir/stylelib/mystyle.mplstyle then you can use it via ('mystyle') The style sheet format is axes.labelsize: 16 You can also do this by creating a style sheet in the stylelib directory under the matplotlib configuration directory (you can get your configuration directory from matplotlib.get_configdir()). The defaults can be restored using (plt.rcParamsDefault) Mpl.rc('axes', labelsize=16, titlesize=16) Globally setting font sizes via rcParams should be done with import matplotlib.pyplot as plt matplotlib.pyplot should be used directly instead. Per the official guide, use of pylab is no longer recommended. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |