Keyword | CPC | PCC | Volume | Score | Length of keyword |
---|---|---|---|---|---|
legend title font size matplotlib | 1.9 | 0.1 | 5829 | 72 | 33 |
legend | 1.36 | 0.1 | 4312 | 68 | 6 |
title | 1.6 | 0.4 | 2636 | 30 | 5 |
font | 1.52 | 0.1 | 7829 | 18 | 4 |
size | 1.76 | 1 | 7173 | 32 | 4 |
matplotlib | 0.15 | 0.7 | 6001 | 68 | 10 |
Keyword | CPC | PCC | Volume | Score |
---|---|---|---|---|
legend title font size matplotlib | 0.25 | 0.9 | 4079 | 90 |
change legend title font size matplotlib | 1.34 | 0.7 | 2116 | 43 |
matplotlib plot legend font size | 0.46 | 0.2 | 6914 | 30 |
change legend font size matplotlib | 0.69 | 0.7 | 9390 | 80 |
matplotlib increase legend font size | 1.18 | 0.6 | 6336 | 6 |
python matplotlib legend font size | 1.39 | 0.6 | 938 | 99 |
legend text size matplotlib | 1.39 | 0.8 | 7431 | 97 |
matplotlib legend font style | 0.59 | 0.8 | 9299 | 50 |
matplotlib legend font type | 0.59 | 0.3 | 5080 | 94 |
legend size in matplotlib | 1.82 | 0.6 | 4085 | 69 |
set legend text size matplotlib | 0.79 | 1 | 7496 | 14 |
change font legend matplotlib | 1.23 | 0.3 | 8597 | 17 |
set legend title matplotlib | 0.79 | 0.9 | 6921 | 7 |
Now in 2021, with matplotlib 3.4.2 you can set your legend fonts with plt.legend (title="My Title", fontsize=10, title_fontsize=15) where fontsize is the font size of the items in legend and title_fontsize is the font size of the legend title. More information in matplotlib documentation
How to change the font size in a legend?leg = ax.legend () leg.set_title ('A great legend',prop= {'size':14}) Inspired by the current top answer, I found a slightly more natural way to change the fontsizes in the legend. The fontsize argument sets the font size of each of the data labels, and the title_fontsize argument sets the fontsize of the title, if you give the legend a title.
What is the difference between title_fontsize and fontsize in Matplotlib?The fontsize argument sets the font size of each of the data labels, and the title_fontsize argument sets the fontsize of the title, if you give the legend a title. import matplotlib.pyplot as plt fig, ax = plt.subplots () ax.plot ( [0,1,2], [2,1,2],label='test_data (fs=12)') ax.legend (fontsize=12, title='TITLE (fs=30)',title_fontsize=30)
What is the /cache/Matplotlib/fontlist JSON file?The ~/.cache/matplotlib/fontList.json file gives you a humanly-readable list of all the fonts matplotlib knows about. There, you'll find entries that look like this: