Set the lower and upper numerical bounds of the y-axis. This method will honor axis inversion regardless of parameter order. It will not change the autoscaling setting (`.get_autoscaley_on()`). Parameters ---------- lower, upper : float or None
(self, lower=None, upper=None)
| 4085 | return top, bottom |
| 4086 | |
| 4087 | def set_ybound(self, lower=None, upper=None): |
| 4088 | """ |
| 4089 | Set the lower and upper numerical bounds of the y-axis. |
| 4090 | |
| 4091 | This method will honor axis inversion regardless of parameter order. |
| 4092 | It will not change the autoscaling setting (`.get_autoscaley_on()`). |
| 4093 | |
| 4094 | Parameters |
| 4095 | ---------- |
| 4096 | lower, upper : float or None |
| 4097 | The lower and upper bounds. If *None*, the respective axis bound |
| 4098 | is not modified. |
| 4099 | |
| 4100 | .. ACCEPTS: (lower: float, upper: float) |
| 4101 | |
| 4102 | See Also |
| 4103 | -------- |
| 4104 | get_ybound |
| 4105 | get_ylim, set_ylim |
| 4106 | invert_yaxis, yaxis_inverted |
| 4107 | """ |
| 4108 | if upper is None and np.iterable(lower): |
| 4109 | lower, upper = lower |
| 4110 | |
| 4111 | old_lower, old_upper = self.get_ybound() |
| 4112 | if lower is None: |
| 4113 | lower = old_lower |
| 4114 | if upper is None: |
| 4115 | upper = old_upper |
| 4116 | |
| 4117 | self.set_ylim(sorted((lower, upper), |
| 4118 | reverse=bool(self.yaxis_inverted())), |
| 4119 | auto=None) |
| 4120 | |
| 4121 | def get_ylim(self): |
| 4122 | """ |