@@ -812,8 +812,17 @@ def from_extents(*args, minpos=None):
812
812
"""
813
813
Create a new Bbox from *left*, *bottom*, *right* and *top*.
814
814
815
- The *y*-axis increases upwards. Optionally, passing *minpos* will set
816
- that property on the returned Bbox.
815
+ The *y*-axis increases upwards.
816
+
817
+ Parameters
818
+ ----------
819
+ left, bottom, right, top : float
820
+ The four extents of the bounding box.
821
+
822
+ minpos : float or None
823
+ If this is supplied, the Bbox will have a minimum positive value
824
+ set. This is useful when dealing with logarithmic scales and other
825
+ scales where negative bounds result in floating point errors.
817
826
"""
818
827
bbox = Bbox (np .reshape (args , (2 , 2 )))
819
828
if minpos is not None :
@@ -957,14 +966,35 @@ def bounds(self, bounds):
957
966
958
967
@property
959
968
def minpos (self ):
969
+ """
970
+ The minimum positive value in both directions within the Bbox.
971
+
972
+ This is useful when dealing with logarithmic scales and other scales
973
+ where negative bounds result in floating point errors, and will be used
974
+ as the minimum extent instead of *p0*.
975
+ """
960
976
return self ._minpos
961
977
962
978
@property
963
979
def minposx (self ):
980
+ """
981
+ The minimum positive value in the *x*-direction within the Bbox.
982
+
983
+ This is useful when dealing with logarithmic scales and other scales
984
+ where negative bounds result in floating point errors, and will be used
985
+ as the minimum *x*-extent instead of *x0*.
986
+ """
964
987
return self ._minpos [0 ]
965
988
966
989
@property
967
990
def minposy (self ):
991
+ """
992
+ The minimum positive value in the *y*-direction within the Bbox.
993
+
994
+ This is useful when dealing with logarithmic scales and other scales
995
+ where negative bounds result in floating point errors, and will be used
996
+ as the minimum *y*-extent instead of *y0*.
997
+ """
968
998
return self ._minpos [1 ]
969
999
970
1000
def get_points (self ):
0 commit comments