@@ -861,7 +861,13 @@ def set_size_inches(self, w, h=None, forward=True):
861
861
862
862
See Also
863
863
--------
864
- matplotlib.Figure.get_size_inches
864
+ matplotlib.figure.Figure.get_size_inches
865
+ matplotlib.figure.Figure.set_figwidth
866
+ matplotlib.figure.Figure.set_figheight
867
+
868
+ Notes
869
+ -----
870
+ To transform from pixels to inches divide by `Figure.dpi`.
865
871
"""
866
872
if h is None : # Got called with a single pair as argument.
867
873
w , h = w
@@ -889,7 +895,13 @@ def get_size_inches(self):
889
895
890
896
See Also
891
897
--------
892
- matplotlib.Figure.set_size_inches
898
+ matplotlib.figure.Figure.set_size_inches
899
+ matplotlib.figure.Figure.get_figwidth
900
+ matplotlib.figure.Figure.get_figheight
901
+
902
+ Notes
903
+ -----
904
+ The size in pixels can be obtained by multiplying with `Figure.dpi`.
893
905
"""
894
906
return np .array (self .bbox_inches .p1 )
895
907
@@ -902,11 +914,11 @@ def get_facecolor(self):
902
914
return self .patch .get_facecolor ()
903
915
904
916
def get_figwidth (self ):
905
- """Return the figure width as a float ."""
917
+ """Return the figure width in inches ."""
906
918
return self .bbox_inches .width
907
919
908
920
def get_figheight (self ):
909
- """Return the figure height as a float ."""
921
+ """Return the figure height in inches ."""
910
922
return self .bbox_inches .height
911
923
912
924
def get_dpi (self ):
@@ -960,6 +972,12 @@ def set_figwidth(self, val, forward=True):
960
972
----------
961
973
val : float
962
974
forward : bool
975
+ See `set_size_inches`.
976
+
977
+ See Also
978
+ --------
979
+ matplotlib.figure.Figure.set_figheight
980
+ matplotlib.figure.Figure.set_size_inches
963
981
"""
964
982
self .set_size_inches (val , self .get_figheight (), forward = forward )
965
983
@@ -971,6 +989,12 @@ def set_figheight(self, val, forward=True):
971
989
----------
972
990
val : float
973
991
forward : bool
992
+ See `set_size_inches`.
993
+
994
+ See Also
995
+ --------
996
+ matplotlib.figure.Figure.set_figwidth
997
+ matplotlib.figure.Figure.set_size_inches
974
998
"""
975
999
self .set_size_inches (self .get_figwidth (), val , forward = forward )
976
1000
0 commit comments