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