jmquintana79
3/14/2016 - 7:25 AM

Setup Legend in Matplotlib

Setup Legend in Matplotlib

from matplotlib.font_manager import FontProperties

# font size of legend
fontP = FontProperties()
fontP.set_size('xx-small')

# location of legend
xl = 1
yl = 0

# display lengend
plt.legend(loc=yl, ncol=xl,prop = fontP)