![]() ![]() # Set the font dictionaries (for plot title and axis titles) Import matplotlib.font_manager as font_manager It basically combines ryggyr's answer here with other answers on SO. It is rather cumbersome but I could not get to grips with any other method personally. It does not use rc (which doesn't seem to work for me). ![]() This answer is for anyone trying to change all the fonts, including for the legend, and for anyone trying to use different fonts and sizes for each thing. Should be fixed in 2.0.1 but I've included the workaround in the 2nd part of the answer. Update #3: There is a bug in Matplotlib 2.0.0 that's causing tick labels for logarithmic axes to revert to the default font. Update #2: I've figured out changing legend title fonts too. Update: See the bottom of the answer for a slightly better way of doing it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |