Answers for "matplotlib legend font style"

1

text size legend to bottom matplotlib

plot.legend(loc=2, prop={'size': 6})
Posted by: Guest on November-27-2020
1

matplotlib custom legend

import matplotlib.lines as mlines

eight = mlines.Line2D([], [], color='blue', marker='s', ls='', label='8')
nine = mlines.Line2D([], [], color='blue', marker='D', ls='', label='9')
# etc etc
plt.legend(handles=[eight, nine])
Posted by: Guest on January-13-2022

Python Answers by Framework

Browse Popular Code Answers by Language