Skip to content

Commit d79dbc7

Browse files
committed
DOC : minor tweaks to set/get_size_inches
- better numpydoc style - added inch <-> cm conversion factor
1 parent 640d05f commit d79dbc7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lib/matplotlib/figure.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def set_size_inches(self, *args, **kwargs):
623623
"""
624624
set_size_inches(w,h, forward=False)
625625
626-
Set the figure size in inches
626+
Set the figure size in inches (1in == 2.54cm)
627627
628628
Usage::
629629
@@ -636,7 +636,10 @@ def set_size_inches(self, *args, **kwargs):
636636
637637
ACCEPTS: a w,h tuple with w,h in inches
638638
639-
.. seealso:: :func:`~matplotlib.Figure.get_size_inches`
639+
See Also
640+
--------
641+
642+
:func:`~matplotlib.Figure.get_size_inches`
640643
"""
641644

642645
forward = kwargs.get('forward', False)
@@ -658,14 +661,18 @@ def set_size_inches(self, *args, **kwargs):
658661

659662
def get_size_inches(self):
660663
"""
661-
Returns the current size of the figure in inches as an numpy array.
664+
Returns the current size of the figure in inches (1in == 2.54cm)
665+
as an numpy array.
662666
663667
Returns
664668
-------
665669
size : ndarray
666670
The size of the figure in inches
667671
668-
.. seealso:: :func:`~matplotlib.Figure.set_size_inches`
672+
Also See
673+
--------
674+
675+
:func:`~matplotlib.Figure.set_size_inches`
669676
"""
670677
return np.array(self.bbox_inches.p1)
671678

0 commit comments

Comments
 (0)