Create a new Bbox from *left*, *bottom*, *right* and *top*. The *y*-axis increases upwards. Parameters ---------- left, bottom, right, top : float The four extents of the bounding box. minpos : float or None If this is suppli
(*args, minpos=None)
| 827 | |
| 828 | @staticmethod |
| 829 | def from_extents(*args, minpos=None): |
| 830 | """ |
| 831 | Create a new Bbox from *left*, *bottom*, *right* and *top*. |
| 832 | |
| 833 | The *y*-axis increases upwards. |
| 834 | |
| 835 | Parameters |
| 836 | ---------- |
| 837 | left, bottom, right, top : float |
| 838 | The four extents of the bounding box. |
| 839 | minpos : float or None |
| 840 | If this is supplied, the Bbox will have a minimum positive value |
| 841 | set. This is useful when dealing with logarithmic scales and other |
| 842 | scales where negative bounds result in floating point errors. |
| 843 | """ |
| 844 | bbox = Bbox(np.asarray(args, dtype=float).reshape((2, 2))) |
| 845 | if minpos is not None: |
| 846 | bbox._minpos[:] = minpos |
| 847 | return bbox |
| 848 | |
| 849 | def __format__(self, fmt): |
| 850 | return ( |