@@ -892,11 +892,12 @@ def add_axes(self, *args, **kwargs):
892
892
polar : boolean, optional
893
893
If True, equivalent to projection='polar'.
894
894
895
- This method also takes the keyword arguments for
896
- :class:`~matplotlib.axes.Axes`.
895
+ **kwargs
896
+ This method also takes the keyword arguments for
897
+ :class:`~matplotlib.axes.Axes`.
897
898
898
899
Returns
899
- ------
900
+ -------
900
901
axes : Axes
901
902
The added axes.
902
903
@@ -994,8 +995,9 @@ def add_subplot(self, *args, **kwargs):
994
995
polar : boolean, optional
995
996
If True, equivalent to projection='polar'.
996
997
997
- This method also takes the keyword arguments for
998
- :class:`~matplotlib.axes.Axes`.
998
+ **kwargs
999
+ This method also takes the keyword arguments for
1000
+ :class:`~matplotlib.axes.Axes`.
999
1001
1000
1002
Returns
1001
1003
-------
@@ -1010,6 +1012,8 @@ def add_subplot(self, *args, **kwargs):
1010
1012
1011
1013
Examples
1012
1014
--------
1015
+ ::
1016
+
1013
1017
fig.add_subplot(111)
1014
1018
1015
1019
# equivalent but more general
@@ -1734,9 +1738,10 @@ def savefig(self, fname, **kwargs):
1734
1738
1735
1739
The output formats available depend on the backend being used.
1736
1740
1737
- Arguments:
1741
+ Parameters
1742
+ ----------
1738
1743
1739
- * fname*:
1744
+ fname : str or file-like object
1740
1745
A string containing a path to a filename, or a Python
1741
1746
file-like object, or possibly some backend-dependent object
1742
1747
such as :class:`~matplotlib.backends.backend_pdf.PdfPages`.
@@ -1749,29 +1754,33 @@ def savefig(self, fname, **kwargs):
1749
1754
If *fname* is not a string, remember to specify *format* to
1750
1755
ensure that the correct backend is used.
1751
1756
1752
- Keyword arguments:
1757
+ Other Parameters
1758
+ ----------------
1753
1759
1754
- * dpi* : [ *None* | `` scalar > 0`` | 'figure']
1760
+ dpi : [ *None* | scalar > 0 | 'figure']
1755
1761
The resolution in dots per inch. If *None* it will default to
1756
1762
the value ``savefig.dpi`` in the matplotlibrc file. If 'figure'
1757
1763
it will set the dpi to be the value of the figure.
1758
1764
1759
- *facecolor*, *edgecolor*:
1760
- the colors of the figure rectangle
1765
+ facecolor : color spec or None, optional
1766
+ the facecolor of the figure; if None, defaults to savefig.facecolor
1761
1767
1762
- *orientation*: [ 'landscape' | 'portrait' ]
1768
+ edgecolor : color spec or None, optional
1769
+ the edgecolor of the figure; if None, defaults to savefig.edgecolor
1770
+
1771
+ orientation : {'landscape', 'portrait'}
1763
1772
not supported on all backends; currently only on postscript output
1764
1773
1765
- * papertype*:
1774
+ papertype : str
1766
1775
One of 'letter', 'legal', 'executive', 'ledger', 'a0' through
1767
1776
'a10', 'b0' through 'b10'. Only supported for postscript
1768
1777
output.
1769
1778
1770
- * format*:
1779
+ format : str
1771
1780
One of the file extensions supported by the active
1772
1781
backend. Most backends support png, pdf, ps, eps and svg.
1773
1782
1774
- * transparent*:
1783
+ transparent : bool
1775
1784
If *True*, the axes patches will all be transparent; the
1776
1785
figure patch will also be transparent unless facecolor
1777
1786
and/or edgecolor are specified via kwargs.
@@ -1780,21 +1789,21 @@ def savefig(self, fname, **kwargs):
1780
1789
transparency of these patches will be restored to their
1781
1790
original values upon exit of this function.
1782
1791
1783
- * frameon*:
1792
+ frameon : bool
1784
1793
If *True*, the figure patch will be colored, if *False*, the
1785
1794
figure background will be transparent. If not provided, the
1786
1795
rcParam 'savefig.frameon' will be used.
1787
1796
1788
- * bbox_inches*:
1797
+ bbox_inches : str or `~matplotlib.transforms.Bbox`, optional
1789
1798
Bbox in inches. Only the given portion of the figure is
1790
1799
saved. If 'tight', try to figure out the tight bbox of
1791
- the figure.
1800
+ the figure. If None, use savefig.bbox
1792
1801
1793
- * pad_inches*:
1802
+ pad_inches : scalar, optional
1794
1803
Amount of padding around the figure when bbox_inches is
1795
- 'tight'.
1804
+ 'tight'. If None, use savefig.pad_inches
1796
1805
1797
- * bbox_extra_artists*:
1806
+ bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
1798
1807
A list of extra artists that will be considered when the
1799
1808
tight bbox is calculated.
1800
1809
@@ -1988,17 +1997,20 @@ def tight_layout(self, renderer=None, pad=1.08, h_pad=None, w_pad=None,
1988
1997
"""
1989
1998
Adjust subplot parameters to give specified padding.
1990
1999
1991
- Parameters:
2000
+ Parameters
2001
+ ----------
1992
2002
1993
- pad : float
2003
+ pad : float
1994
2004
padding between the figure edge and the edges of subplots,
1995
2005
as a fraction of the font-size.
1996
- h_pad, w_pad : float
2006
+
2007
+ h_pad, w_pad : float, optional
1997
2008
padding (height/width) between edges of adjacent subplots.
1998
2009
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
2010
+
2011
+ rect : tuple (left, bottom, right, top), optional
2012
+ a rectangle (left, bottom, right, top) in the normalized
2013
+ figure coordinate that the whole subplots area (including
2002
2014
labels) will fit into. Default is (0, 0, 1, 1).
2003
2015
"""
2004
2016
0 commit comments