@@ -624,7 +624,6 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which=None):
624624
625625 Parameters
626626 ----------
627-
628627 bottom : scalar
629628 The bottom of the subplots for :meth:`subplots_adjust`
630629
@@ -660,7 +659,7 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which=None):
660659 self .stale = True
661660
662661 def get_children (self ):
663- 'get a list of artists contained in the figure'
662+ """Get a list of artists contained in the figure."""
664663 children = [self .patch ]
665664 children .extend (self .artists )
666665 children .extend (self .axes )
@@ -683,9 +682,9 @@ def contains(self, mouseevent):
683682 return inside , {}
684683
685684 def get_window_extent (self , * args , ** kwargs ):
686- ''''
685+ """
687686 Return figure bounding box in display space; arguments are ignored.
688- '''
687+ """
689688 return self .bbox
690689
691690 def suptitle (self , t , ** kwargs ):
@@ -886,7 +885,6 @@ def set_size_inches(self, w, h=None, forward=True):
886885
887886 See Also
888887 --------
889-
890888 matplotlib.Figure.get_size_inches
891889 """
892890
@@ -923,33 +921,32 @@ def get_size_inches(self):
923921
924922 See Also
925923 --------
926-
927924 matplotlib.Figure.set_size_inches
928925 """
929926 return np .array (self .bbox_inches .p1 )
930927
931928 def get_edgecolor (self ):
932- ' Get the edge color of the Figure rectangle'
929+ """ Get the edge color of the Figure rectangle."""
933930 return self .patch .get_edgecolor ()
934931
935932 def get_facecolor (self ):
936- ' Get the face color of the Figure rectangle'
933+ """ Get the face color of the Figure rectangle."""
937934 return self .patch .get_facecolor ()
938935
939936 def get_figwidth (self ):
940- ' Return the figwidth as a float'
937+ """ Return the figwidth as a float."""
941938 return self .bbox_inches .width
942939
943940 def get_figheight (self ):
944- ' Return the figheight as a float'
941+ """ Return the figheight as a float."""
945942 return self .bbox_inches .height
946943
947944 def get_dpi (self ):
948- ' Return the dpi as a float'
945+ """ Return the dpi as a float."""
949946 return self .dpi
950947
951948 def get_frameon (self ):
952- 'get the boolean indicating frameon'
949+ """Get the boolean indicating frameon."""
953950 return self .frameon
954951
955952 def set_edgecolor (self , color ):
@@ -1012,7 +1009,7 @@ def delaxes(self, ax):
10121009 self .stale = True
10131010
10141011 def _make_key (self , * args , ** kwargs ):
1015- 'make a hashable key out of args and kwargs'
1012+ """Make a hashable key out of args and kwargs."""
10161013
10171014 def fixitems (items ):
10181015 # items may have arrays and lists in them, so convert them
@@ -1483,8 +1480,8 @@ def draw(self, renderer):
14831480
14841481 def draw_artist (self , a ):
14851482 """
1486- draw :class:`matplotlib.artist.Artist` instance *a* only --
1487- this is available only after the figure is drawn
1483+ Draw :class:`matplotlib.artist.Artist` instance *a* only.
1484+ This is available only after the figure is drawn.
14881485 """
14891486 if self ._cachedRenderer is None :
14901487 raise AttributeError ("draw_artist can only be used after an "
@@ -1817,16 +1814,15 @@ def gca(self, **kwargs):
18171814 return self .add_subplot (1 , 1 , 1 , ** kwargs )
18181815
18191816 def sca (self , a ):
1820- ' Set the current axes to be a and return a'
1817+ """ Set the current axes to be a and return a."""
18211818 self ._axstack .bubble (a )
18221819 for func in self ._axobservers :
18231820 func (self )
18241821 return a
18251822
18261823 def _gci (self ):
18271824 """
1828- helper for :func:`~matplotlib.pyplot.gci`;
1829- do not use elsewhere.
1825+ Helper for :func:`~matplotlib.pyplot.gci`. Do not use elsewhere.
18301826 """
18311827 # Look first for an image in the current Axes:
18321828 cax = self ._axstack .current_key_axes ()[1 ]
@@ -1924,7 +1920,7 @@ def make_active(event):
19241920 self .stale = True
19251921
19261922 def add_axobserver (self , func ):
1927- 'whenever the axes state change, ``func(self)`` will be called'
1923+ """Whenever the axes state change, ``func(self)`` will be called."""
19281924 self ._axobservers .append (func )
19291925
19301926 def savefig (self , fname , ** kwargs ):
@@ -2083,7 +2079,7 @@ def subplots_adjust(self, *args, **kwargs):
20832079 wspace=None, hspace=None)
20842080
20852081 Update the :class:`SubplotParams` with *kwargs* (defaulting to rc when
2086- *None*) and update the subplot locations
2082+ *None*) and update the subplot locations.
20872083
20882084 """
20892085 self .subplotpars .update (* args , ** kwargs )
@@ -2246,7 +2242,6 @@ def tight_layout(self, renderer=None, pad=1.08, h_pad=None, w_pad=None,
22462242
22472243 Parameters
22482244 ----------
2249-
22502245 pad : float
22512246 padding between the figure edge and the edges of subplots,
22522247 as a fraction of the font-size.
@@ -2296,19 +2291,19 @@ def align_xlabels(self, axs=None):
22962291 Optional list of (or ndarray) `~matplotlib.axes.Axes` to align
22972292 the xlabels. Default is to align all axes on the figure.
22982293
2299- Note
2300- ----
2301- This assumes that ``axs`` are from the same `~.GridSpec`, so that
2302- their `~.SubplotSpec` positions correspond to figure positions.
2303-
23042294 See Also
23052295 --------
23062296 matplotlib.figure.Figure.align_ylabels
23072297
23082298 matplotlib.figure.Figure.align_labels
23092299
2310- Example
2311- -------
2300+ Notes
2301+ -----
2302+ This assumes that ``axs`` are from the same `~.GridSpec`, so that
2303+ their `~.SubplotSpec` positions correspond to figure positions.
2304+
2305+ Examples
2306+ --------
23122307 Example with rotated xtick labels::
23132308
23142309 fig, axs = plt.subplots(1, 2)
@@ -2364,19 +2359,19 @@ def align_ylabels(self, axs=None):
23642359 Optional list (or ndarray) of `~matplotlib.axes.Axes` to align
23652360 the ylabels. Default is to align all axes on the figure.
23662361
2367- Note
2368- ----
2369- This assumes that ``axs`` are from the same `~.GridSpec`, so that
2370- their `~.SubplotSpec` positions correspond to figure positions.
2371-
23722362 See Also
23732363 --------
23742364 matplotlib.figure.Figure.align_xlabels
23752365
23762366 matplotlib.figure.Figure.align_labels
23772367
2378- Example
2379- -------
2368+ Notes
2369+ -----
2370+ This assumes that ``axs`` are from the same `~.GridSpec`, so that
2371+ their `~.SubplotSpec` positions correspond to figure positions.
2372+
2373+ Examples
2374+ --------
23802375 Example with large yticks labels::
23812376
23822377 fig, axs = plt.subplots(2, 1)
0 commit comments