@@ -507,7 +507,6 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which=None):
507507
508508 Parameters
509509 ----------
510-
511510 bottom : scalar
512511 The bottom of the subplots for :meth:`subplots_adjust`
513512
@@ -543,7 +542,7 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which=None):
543542 self .stale = True
544543
545544 def get_children (self ):
546- 'get a list of artists contained in the figure'
545+ """Get a list of artists contained in the figure."""
547546 children = [self .patch ]
548547 children .extend (self .artists )
549548 children .extend (self .axes )
@@ -566,9 +565,9 @@ def contains(self, mouseevent):
566565 return inside , {}
567566
568567 def get_window_extent (self , * args , ** kwargs ):
569- ''''
568+ """
570569 Return figure bounding box in display space; arguments are ignored.
571- '''
570+ """
572571 return self .bbox
573572
574573 def suptitle (self , t , ** kwargs ):
@@ -757,7 +756,6 @@ def set_size_inches(self, w, h=None, forward=True):
757756
758757 See Also
759758 --------
760-
761759 matplotlib.Figure.get_size_inches
762760 """
763761
@@ -794,33 +792,32 @@ def get_size_inches(self):
794792
795793 See Also
796794 --------
797-
798795 matplotlib.Figure.set_size_inches
799796 """
800797 return np .array (self .bbox_inches .p1 )
801798
802799 def get_edgecolor (self ):
803- ' Get the edge color of the Figure rectangle'
800+ """ Get the edge color of the Figure rectangle."""
804801 return self .patch .get_edgecolor ()
805802
806803 def get_facecolor (self ):
807- ' Get the face color of the Figure rectangle'
804+ """ Get the face color of the Figure rectangle."""
808805 return self .patch .get_facecolor ()
809806
810807 def get_figwidth (self ):
811- ' Return the figwidth as a float'
808+ """ Return the figwidth as a float."""
812809 return self .bbox_inches .width
813810
814811 def get_figheight (self ):
815- ' Return the figheight as a float'
812+ """ Return the figheight as a float."""
816813 return self .bbox_inches .height
817814
818815 def get_dpi (self ):
819- ' Return the dpi as a float'
816+ """ Return the dpi as a float."""
820817 return self .dpi
821818
822819 def get_frameon (self ):
823- 'get the boolean indicating frameon'
820+ """Get the boolean indicating frameon."""
824821 return self .frameon
825822
826823 def set_edgecolor (self , color ):
@@ -883,7 +880,7 @@ def delaxes(self, ax):
883880 self .stale = True
884881
885882 def _make_key (self , * args , ** kwargs ):
886- 'make a hashable key out of args and kwargs'
883+ """Make a hashable key out of args and kwargs."""
887884
888885 def fixitems (items ):
889886 #items may have arrays and lists in them, so convert them
@@ -1345,8 +1342,8 @@ def draw(self, renderer):
13451342
13461343 def draw_artist (self , a ):
13471344 """
1348- draw :class:`matplotlib.artist.Artist` instance *a* only --
1349- this is available only after the figure is drawn
1345+ Draw :class:`matplotlib.artist.Artist` instance *a* only.
1346+ This is available only after the figure is drawn.
13501347 """
13511348 if self ._cachedRenderer is None :
13521349 raise AttributeError ("draw_artist can only be used after an "
@@ -1679,16 +1676,15 @@ def gca(self, **kwargs):
16791676 return self .add_subplot (1 , 1 , 1 , ** kwargs )
16801677
16811678 def sca (self , a ):
1682- ' Set the current axes to be a and return a'
1679+ """ Set the current axes to be a and return a."""
16831680 self ._axstack .bubble (a )
16841681 for func in self ._axobservers :
16851682 func (self )
16861683 return a
16871684
16881685 def _gci (self ):
16891686 """
1690- helper for :func:`~matplotlib.pyplot.gci`;
1691- do not use elsewhere.
1687+ Helper for :func:`~matplotlib.pyplot.gci`. Do not use elsewhere.
16921688 """
16931689 # Look first for an image in the current Axes:
16941690 cax = self ._axstack .current_key_axes ()[1 ]
@@ -1775,7 +1771,7 @@ def make_active(event):
17751771 self .stale = True
17761772
17771773 def add_axobserver (self , func ):
1778- 'whenever the axes state change, ``func(self)`` will be called'
1774+ """Whenever the axes state change, ``func(self)`` will be called."""
17791775 self ._axobservers .append (func )
17801776
17811777 def savefig (self , fname , ** kwargs ):
@@ -1933,7 +1929,7 @@ def subplots_adjust(self, *args, **kwargs):
19331929 wspace=None, hspace=None)
19341930
19351931 Update the :class:`SubplotParams` with *kwargs* (defaulting to rc when
1936- *None*) and update the subplot locations
1932+ *None*) and update the subplot locations.
19371933
19381934 """
19391935 self .subplotpars .update (* args , ** kwargs )
@@ -2057,7 +2053,6 @@ def tight_layout(self, renderer=None, pad=1.08, h_pad=None, w_pad=None,
20572053
20582054 Parameters
20592055 ----------
2060-
20612056 pad : float
20622057 padding between the figure edge and the edges of subplots,
20632058 as a fraction of the font-size.
@@ -2107,19 +2102,19 @@ def align_xlabels(self, axs=None):
21072102 Optional list of (or ndarray) `~matplotlib.axes.Axes` to align
21082103 the xlabels. Default is to align all axes on the figure.
21092104
2110- Note
2111- ----
2112- This assumes that ``axs`` are from the same `~.GridSpec`, so that
2113- their `~.SubplotSpec` positions correspond to figure positions.
2114-
21152105 See Also
21162106 --------
21172107 matplotlib.figure.Figure.align_ylabels
21182108
21192109 matplotlib.figure.Figure.align_labels
21202110
2121- Example
2122- -------
2111+ Notes
2112+ -----
2113+ This assumes that ``axs`` are from the same `~.GridSpec`, so that
2114+ their `~.SubplotSpec` positions correspond to figure positions.
2115+
2116+ Examples
2117+ --------
21232118 Example with rotated xtick labels::
21242119
21252120 fig, axs = plt.subplots(1, 2)
@@ -2175,19 +2170,19 @@ def align_ylabels(self, axs=None):
21752170 Optional list (or ndarray) of `~matplotlib.axes.Axes` to align
21762171 the ylabels. Default is to align all axes on the figure.
21772172
2178- Note
2179- ----
2180- This assumes that ``axs`` are from the same `~.GridSpec`, so that
2181- their `~.SubplotSpec` positions correspond to figure positions.
2182-
21832173 See Also
21842174 --------
21852175 matplotlib.figure.Figure.align_xlabels
21862176
21872177 matplotlib.figure.Figure.align_labels
21882178
2189- Example
2190- -------
2179+ Notes
2180+ -----
2181+ This assumes that ``axs`` are from the same `~.GridSpec`, so that
2182+ their `~.SubplotSpec` positions correspond to figure positions.
2183+
2184+ Examples
2185+ --------
21912186 Example with large yticks labels::
21922187
21932188 fig, axs = plt.subplots(2, 1)
0 commit comments