Axes.
set_ylim
(bottom=None, top=None, emit=True, auto=False, **kw)¶Set the data limits for the yaxis
Call signature:
set_ylim(self, *args, **kwargs):
Examples:
set_ylim((bottom, top))
set_ylim(bottom, top)
set_ylim(bottom=1) # top unchanged
set_ylim(top=1) # bottom unchanged
Keyword arguments:
- bottom: scalar
- The bottom ylim; the previous name, ymin, may still be used
- top: scalar
- The top ylim; the previous name, ymax, may still be used
- emit: [ True | False ]
- Notify observers of limit change
- auto: [ True | False | None ]
- Turn y autoscaling on (True), off (False; default), or leave unchanged (None)
Note, the bottom (formerly ymin) value may be greater than the top (formerly ymax). For example, suppose y is depth in the ocean. Then one might use:
set_ylim(5000, 0)
so 5000 m depth is at the bottom of the plot and the surface, 0 m, is at the top.
Returns the current ylimits as a length 2 tuple
ACCEPTS: length 2 sequence of floats