Help/RFC with 'legend' command

Dear All,

I want to change the fontsize used for my legends.

Analogues to the 'title', 'figtext', 'xlabel' and 'ylabel' commands, it
would have been nice to write:

legend(('...'),loc='...',fontsize=10)

Unfortunately this is not (yet) implemented...

Time Out:

···

=========
Can I make a RFC for this feature to be added...?
And the same for the 'axis' command, e.g. 'axis([...],fontsize=10)',
would also be a nice addition to mpl.

Back to the fontsize issue:

In 'legend.py':

"...
def __init__(self, parent, handles, labels, loc,
                 isaxes=True,
                 numpoints = 4, # the number of points in the
legend line
                 prop = FontProperties(size='smaller'),
                 pad = 0.2, # the fractional whitespace inside
the legend border
                 markerscale = 0.6, # the relative size of legend
markers vs. original
                 # the following dimensions are in axes coords
                 labelsep = 0.005, # the vertical space between the
legend entries
                 handlelen = 0.05, # the length of the legend lines
                 handletextsep = 0.02, # the space between the legend
line and legend text
                 axespad = 0.02, # the border between the axes and
legend edge

                 shadow=False,
                 ):
..."

The font is defined as 'smaller', but 'smaller' than what...?

It is not affected (imho) by either of the following settings in my
'matplotlibrc' file:

"...
font.size : 12
...
axes.labelsize : 16
...
tick.labelsize : 10
..."

Kind regards,

Peter-Jan

The font is defined as ‘smaller’, but ‘smaller’ than what…?

Smaller than the default font size, usually 12pt. This option
allows you to set the default font size for the entire plot and then
just adjust the axis, label, etc. font sizes relative to it. Therefore,
if you decide that all the fonts of a plot are too small, then you only
need to adjust the default font size and the others will scale
proportionaly.

It is not affected (imho) by either of the following settings in my
‘matplotlibrc’ file:

"…
font.size : 12

It should depend on font.size in the rc file.


axes.labelsize : 16

tick.labelsize : 10
…"

– Paul

···

On 12/9/05, Randewijk P-J <pjrandew@…878…841…> <pjrandew@…920…41… > wrote:


Paul Barrett,
PhD
Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218