@@ -884,20 +884,20 @@ def add_axes(self, *args, **kwargs):
884
884
rect : sequence of float
885
885
A 4-length sequence of [left, bottom, width, height] quantities.
886
886
887
- projection :
888
- ['aitoff' | 'hammer' | 'lambert' | 'mollweide' | \
889
- 'polar' | 'rectilinear'], optional
887
+ projection : {'aitoff', 'hammer', 'lambert', 'mollweide', \
888
+ 'polar', 'rectilinear'}, optional
890
889
The projection type of the axes.
891
890
892
891
polar : boolean, optional
893
892
If True, equivalent to projection='polar'.
894
893
895
- This method also takes the keyword arguments for
896
- :class:`~matplotlib.axes.Axes`.
894
+ **kwargs
895
+ This method also takes the keyword arguments for
896
+ :class:`~.axes.Axes`.
897
897
898
898
Returns
899
- ------
900
- axes : Axes
899
+ -------
900
+ axes : :class:`~.axes. Axes`
901
901
The added axes.
902
902
903
903
Examples
@@ -987,19 +987,20 @@ def add_subplot(self, *args, **kwargs):
987
987
integers are I, J, and K, the subplot is the Ith plot on a
988
988
grid with J rows and K columns.
989
989
990
- projection : [ 'aitoff' | 'hammer' | 'lambert' | \
991
- 'mollweide' | 'polar' | 'rectilinear'] , optional
990
+ projection : { 'aitoff', 'hammer', 'lambert', 'mollweide', \
991
+ 'polar', 'rectilinear'} , optional
992
992
The projection type of the axes.
993
993
994
994
polar : boolean, optional
995
995
If True, equivalent to projection='polar'.
996
996
997
- This method also takes the keyword arguments for
998
- :class:`~matplotlib.axes.Axes`.
997
+ **kwargs
998
+ This method also takes the keyword arguments for
999
+ :class:`~matplotlib.axes.Axes`.
999
1000
1000
1001
Returns
1001
1002
-------
1002
- axes : Axes
1003
+ axes : :class:`~matplotlib.axes. Axes`
1003
1004
The axes of the subplot.
1004
1005
1005
1006
Notes
@@ -1010,6 +1011,8 @@ def add_subplot(self, *args, **kwargs):
1010
1011
1011
1012
Examples
1012
1013
--------
1014
+ ::
1015
+
1013
1016
fig.add_subplot(111)
1014
1017
1015
1018
# equivalent but more general
@@ -1440,22 +1443,22 @@ def legend(self, *args, **kwargs):
1440
1443
If shadow is activated and framealpha is ``None`` the
1441
1444
default value is being ignored.
1442
1445
1443
- facecolor : None or " inherit" or a color spec
1446
+ facecolor : None or ' inherit' or a color spec
1444
1447
Control the legend's background color.
1445
1448
Default is ``None`` which will take the value from the
1446
1449
``legend.facecolor`` :data:`rcParam<matplotlib.rcParams>`.
1447
- If ``" inherit" ``, it will take the ``axes.facecolor``
1450
+ If ``' inherit' ``, it will take the ``axes.facecolor``
1448
1451
:data:`rcParam<matplotlib.rcParams>`.
1449
1452
1450
- edgecolor : None or " inherit" or a color spec
1453
+ edgecolor : None or ' inherit' or a color spec
1451
1454
Control the legend's background patch edge color.
1452
1455
Default is ``None`` which will take the value from the
1453
1456
``legend.edgecolor`` :data:`rcParam<matplotlib.rcParams>`.
1454
- If ``" inherit" ``, it will take the ``axes.edgecolor``
1457
+ If ``' inherit' ``, it will take the ``axes.edgecolor``
1455
1458
:data:`rcParam<matplotlib.rcParams>`.
1456
1459
1457
- mode : {" expand" , None}
1458
- If `mode` is set to ``" expand" `` the legend will be horizontally
1460
+ mode : {' expand' , None}
1461
+ If `mode` is set to ``' expand' `` the legend will be horizontally
1459
1462
expanded to fill the axes area (or `bbox_to_anchor` if defines
1460
1463
the legend's size).
1461
1464
@@ -1734,9 +1737,10 @@ def savefig(self, fname, **kwargs):
1734
1737
1735
1738
The output formats available depend on the backend being used.
1736
1739
1737
- Arguments:
1740
+ Parameters
1741
+ ----------
1738
1742
1739
- * fname*:
1743
+ fname : str or file-like object
1740
1744
A string containing a path to a filename, or a Python
1741
1745
file-like object, or possibly some backend-dependent object
1742
1746
such as :class:`~matplotlib.backends.backend_pdf.PdfPages`.
@@ -1749,29 +1753,33 @@ def savefig(self, fname, **kwargs):
1749
1753
If *fname* is not a string, remember to specify *format* to
1750
1754
ensure that the correct backend is used.
1751
1755
1752
- Keyword arguments:
1756
+ Other Parameters
1757
+ ----------------
1753
1758
1754
- * dpi* : [ *None* | `` scalar > 0`` | 'figure']
1759
+ dpi : [ *None* | scalar > 0 | 'figure']
1755
1760
The resolution in dots per inch. If *None* it will default to
1756
1761
the value ``savefig.dpi`` in the matplotlibrc file. If 'figure'
1757
1762
it will set the dpi to be the value of the figure.
1758
1763
1759
- *facecolor*, *edgecolor*:
1760
- the colors of the figure rectangle
1764
+ facecolor : color spec or None, optional
1765
+ the facecolor of the figure; if None, defaults to savefig.facecolor
1761
1766
1762
- *orientation*: [ 'landscape' | 'portrait' ]
1767
+ edgecolor : color spec or None, optional
1768
+ the edgecolor of the figure; if None, defaults to savefig.edgecolor
1769
+
1770
+ orientation : {'landscape', 'portrait'}
1763
1771
not supported on all backends; currently only on postscript output
1764
1772
1765
- * papertype*:
1773
+ papertype : str
1766
1774
One of 'letter', 'legal', 'executive', 'ledger', 'a0' through
1767
1775
'a10', 'b0' through 'b10'. Only supported for postscript
1768
1776
output.
1769
1777
1770
- * format*:
1778
+ format : str
1771
1779
One of the file extensions supported by the active
1772
1780
backend. Most backends support png, pdf, ps, eps and svg.
1773
1781
1774
- * transparent*:
1782
+ transparent : {True, False}
1775
1783
If *True*, the axes patches will all be transparent; the
1776
1784
figure patch will also be transparent unless facecolor
1777
1785
and/or edgecolor are specified via kwargs.
@@ -1780,21 +1788,21 @@ def savefig(self, fname, **kwargs):
1780
1788
transparency of these patches will be restored to their
1781
1789
original values upon exit of this function.
1782
1790
1783
- * frameon*:
1791
+ frameon : {True, False}
1784
1792
If *True*, the figure patch will be colored, if *False*, the
1785
1793
figure background will be transparent. If not provided, the
1786
1794
rcParam 'savefig.frameon' will be used.
1787
1795
1788
- * bbox_inches*:
1796
+ bbox_inches : str or `~matplotlib.transforms.Bbox`, optional
1789
1797
Bbox in inches. Only the given portion of the figure is
1790
1798
saved. If 'tight', try to figure out the tight bbox of
1791
- the figure.
1799
+ the figure. If None, use savefig.bbox
1792
1800
1793
- * pad_inches*:
1801
+ pad_inches : scalar, optional
1794
1802
Amount of padding around the figure when bbox_inches is
1795
- 'tight'.
1803
+ 'tight'. If None, use savefig.pad_inches
1796
1804
1797
- * bbox_extra_artists*:
1805
+ bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
1798
1806
A list of extra artists that will be considered when the
1799
1807
tight bbox is calculated.
1800
1808
@@ -1988,17 +1996,20 @@ def tight_layout(self, renderer=None, pad=1.08, h_pad=None, w_pad=None,
1988
1996
"""
1989
1997
Adjust subplot parameters to give specified padding.
1990
1998
1991
- Parameters:
1999
+ Parameters
2000
+ ----------
1992
2001
1993
- pad : float
2002
+ pad : float
1994
2003
padding between the figure edge and the edges of subplots,
1995
2004
as a fraction of the font-size.
1996
- h_pad, w_pad : float
2005
+
2006
+ h_pad, w_pad : float, optional
1997
2007
padding (height/width) between edges of adjacent subplots.
1998
2008
Defaults to `pad_inches`.
1999
- rect : if rect is given, it is interpreted as a rectangle
2000
- (left, bottom, right, top) in the normalized figure
2001
- coordinate that the whole subplots area (including
2009
+
2010
+ rect : tuple (left, bottom, right, top), optional
2011
+ a rectangle (left, bottom, right, top) in the normalized
2012
+ figure coordinate that the whole subplots area (including
2002
2013
labels) will fit into. Default is (0, 0, 1, 1).
2003
2014
"""
2004
2015
0 commit comments