MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_ybound

Method set_ybound

lib/matplotlib/axes/_base.py:4087–4119  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 4

apply_aspectMethod · 0.95
_set_view_from_bboxMethod · 0.95
test_set_xy_boundFunction · 0.45

Calls 2

get_yboundMethod · 0.95
set_ylimMethod · 0.95

Tested by 2

test_set_xy_boundFunction · 0.36