From 574c60ba223ab3fc3f952745c8ec80990b5fed27 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 20 Jun 2016 18:05:46 -0700 Subject: [PATCH] Small improvements to legend's docstring. The source looks a bit weirder, but the output of `pydoc pylab.legend` (or `plt.legend?` in IPython) is much nicer. I don't think numpydoc allows splitting the argument type information into two lines. --- lib/matplotlib/axes/_axes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 67b14ce31236..a034d13f509b 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -356,7 +356,7 @@ def legend(self, *args, **kwargs): ``bbox_to_anchor`` will be ignored). bbox_to_anchor : :class:`matplotlib.transforms.BboxBase` instance \ - or tuple of floats +or tuple of floats Specify any arbitrary location for the legend in `bbox_transform` coordinates (default Axes coordinates). @@ -372,8 +372,8 @@ def legend(self, *args, **kwargs): The font properties of the legend. If None (default), the current :data:`matplotlib.rcParams` will be used. - fontsize : int or float or {'xx-small', 'x-small', 'small', 'medium',\ - 'large', 'x-large', 'xx-large'} + fontsize : int or float or {'xx-small', 'x-small', 'small', 'medium', \ +'large', 'x-large', 'xx-large'} Controls the font size of the legend. If the value is numeric the size will be the absolute font size in points. String values are relative to the current default font size. This argument is only @@ -403,7 +403,7 @@ def legend(self, *args, **kwargs): drawn ones. Default is ``None`` which will take the value from the ``legend.markerscale`` :data:`rcParam `. - *markerfirst*: [ *True* | *False* ] + markerfirst : bool if *True*, legend marker is placed to the left of the legend label if *False*, legend marker is placed to the right of the legend label