@@ -1574,172 +1574,7 @@ def legend(self, *args, **kwargs):
15741574 Other Parameters
15751575 ----------------
15761576
1577- loc : int or string or pair of floats, default: 'upper right'
1578- The location of the legend. Possible codes are:
1579-
1580- =============== =============
1581- Location String Location Code
1582- =============== =============
1583- 'best' 0
1584- 'upper right' 1
1585- 'upper left' 2
1586- 'lower left' 3
1587- 'lower right' 4
1588- 'right' 5
1589- 'center left' 6
1590- 'center right' 7
1591- 'lower center' 8
1592- 'upper center' 9
1593- 'center' 10
1594- =============== =============
1595-
1596-
1597- Alternatively can be a 2-tuple giving ``x, y`` of the lower-left
1598- corner of the legend in axes coordinates (in which case
1599- ``bbox_to_anchor`` will be ignored).
1600-
1601- bbox_to_anchor : `.BboxBase` or pair of floats
1602- Specify any arbitrary location for the legend in `bbox_transform`
1603- coordinates (default Axes coordinates).
1604-
1605- For example, to put the legend's upper right hand corner in the
1606- center of the axes the following keywords can be used::
1607-
1608- loc='upper right', bbox_to_anchor=(0.5, 0.5)
1609-
1610- ncol : integer
1611- The number of columns that the legend has. Default is 1.
1612-
1613- prop : None or :class:`matplotlib.font_manager.FontProperties` or dict
1614- The font properties of the legend. If None (default), the current
1615- :data:`matplotlib.rcParams` will be used.
1616-
1617- fontsize : int or float or {'xx-small', 'x-small', 'small', 'medium', \
1618- 'large', 'x-large', 'xx-large'}
1619- Controls the font size of the legend. If the value is numeric the
1620- size will be the absolute font size in points. String values are
1621- relative to the current default font size. This argument is only
1622- used if `prop` is not specified.
1623-
1624- numpoints : None or int
1625- The number of marker points in the legend when creating a legend
1626- entry for a `.Line2D` (line).
1627- Default is ``None``, which will take the value from
1628- :rc:`legend.numpoints`.
1629-
1630- scatterpoints : None or int
1631- The number of marker points in the legend when creating
1632- a legend entry for a `.PathCollection` (scatter plot).
1633- Default is ``None``, which will take the value from
1634- :rc:`legend.scatterpoints`.
1635-
1636- scatteryoffsets : iterable of floats
1637- The vertical offset (relative to the font size) for the markers
1638- created for a scatter plot legend entry. 0.0 is at the base the
1639- legend text, and 1.0 is at the top. To draw all markers at the
1640- same height, set to ``[0.5]``. Default is ``[0.375, 0.5, 0.3125]``.
1641-
1642- markerscale : None or int or float
1643- The relative size of legend markers compared with the originally
1644- drawn ones.
1645- Default is ``None``, which will take the value from
1646- :rc:`legend.markerscale`.
1647-
1648- markerfirst : bool
1649- If *True*, legend marker is placed to the left of the legend label.
1650- If *False*, legend marker is placed to the right of the legend
1651- label.
1652- Default is *True*.
1653-
1654- frameon : None or bool
1655- Control whether the legend should be drawn on a patch
1656- (frame).
1657- Default is ``None``, which will take the value from
1658- :rc:`legend.frameon`.
1659-
1660- fancybox : None or bool
1661- Control whether round edges should be enabled around the
1662- :class:`~matplotlib.patches.FancyBboxPatch` which makes up the
1663- legend's background.
1664- Default is ``None``, which will take the value from
1665- :rc:`legend.fancybox`.
1666-
1667- shadow : None or bool
1668- Control whether to draw a shadow behind the legend.
1669- Default is ``None``, which will take the value from
1670- :rc:`legend.shadow`.
1671-
1672- framealpha : None or float
1673- Control the alpha transparency of the legend's background.
1674- Default is ``None``, which will take the value from
1675- :rc:`legend.framealpha`. If shadow is activated and
1676- *framealpha* is ``None``, the default value is ignored.
1677-
1678- facecolor : None or "inherit" or a color spec
1679- Control the legend's background color.
1680- Default is ``None``, which will take the value from
1681- :rc:`legend.facecolor`. If ``"inherit"``, it will take
1682- :rc:`axes.facecolor`.
1683-
1684- edgecolor : None or "inherit" or a color spec
1685- Control the legend's background patch edge color.
1686- Default is ``None``, which will take the value from
1687- :rc:`legend.edgecolor` If ``"inherit"``, it will take
1688- :rc:`axes.edgecolor`.
1689-
1690- mode : {"expand", None}
1691- If `mode` is set to ``"expand"`` the legend will be horizontally
1692- expanded to fill the axes area (or `bbox_to_anchor` if defines
1693- the legend's size).
1694-
1695- bbox_transform : None or :class:`matplotlib.transforms.Transform`
1696- The transform for the bounding box (`bbox_to_anchor`). For a value
1697- of ``None`` (default) the Axes'
1698- :data:`~matplotlib.axes.Axes.transAxes` transform will be used.
1699-
1700- title : str or None
1701- The legend's title. Default is no title (``None``).
1702-
1703- borderpad : float or None
1704- The fractional whitespace inside the legend border.
1705- Measured in font-size units.
1706- Default is ``None``, which will take the value from
1707- :rc:`legend.borderpad`.
1708-
1709- labelspacing : float or None
1710- The vertical space between the legend entries.
1711- Measured in font-size units.
1712- Default is ``None``, which will take the value from
1713- :rc:`legend.labelspacing`.
1714-
1715- handlelength : float or None
1716- The length of the legend handles.
1717- Measured in font-size units.
1718- Default is ``None``, which will take the value from
1719- :rc:`legend.handlelength`.
1720-
1721- handletextpad : float or None
1722- The pad between the legend handle and text.
1723- Measured in font-size units.
1724- Default is ``None``, which will take the value from
1725- :rc:`legend.handletextpad`.
1726-
1727- borderaxespad : float or None
1728- The pad between the axes and legend border.
1729- Measured in font-size units.
1730- Default is ``None``, which will take the value from
1731- :rc:`legend.borderaxespad`.
1732-
1733- columnspacing : float or None
1734- The spacing between columns.
1735- Measured in font-size units.
1736- Default is ``None``, which will take the value from
1737- :rc:`legend.columnspacing`.
1738-
1739- handler_map : dict or None
1740- The custom dictionary mapping instances or types to a legend
1741- handler. This `handler_map` updates the default handler map
1742- found at :func:`matplotlib.legend.Legend.get_legend_handler_map`.
1577+ %(_legend_kw_doc)s
17431578
17441579 Returns
17451580 -------
0 commit comments