I am constantly needing to customize the legend() in python. Whether
it be changing the marker size, the line width, or the fontsize I’m
constantly looking things up. There’s an easy way to set this at the
beginning of your script; as an example:
params = {'legend.fontsize' : 16,
'legend.linewidth' : 1.5,
'legend.markerscale' : 3}
rcParams.update(params)
You could easily add other options such as modifying the handlelen
(line width), font, etc etc. All options can be found via
matplotlib’s legend() api
site.
Comments
comments powered by Disqus