PlasmaCalcs.plotting.plot_tools.lims.plt_zoomy
- PlasmaCalcs.plotting.plot_tools.lims.plt_zoomy(margin=None, *, ax=None, plot_settings=None, data_interval=None, skipna=True, scale=None, **kw_set_margin)
- zoom in/out along the y axis. Equivalent: plt_zoom(x=’y’, …)
- margin: None or number (greater than -0.5, probably close to 0.05) (default: None)
- margin to use for x/y axis, as a fraction of the data interval for that axis.None –> use matplotlib defaults(e.g., plt.rcParams[“axes.xmargin”] or [“axes.ymargin”], or 0 if using imshow)positive number –> pad around the data region, with this much whitespace.E.g. 0.05 means adding 5% whitespace on each side.Use this to zoom out.negative number –> remove this much of the outer parts of the data region.E.g. -0.2 means removing 20% space from each side.Use this to zoom in.For line plots, if also using
robust, ymargin will be applied to the robust y lims.(margin-related params share the same docstring, but refer to:‘xmargin’: x-axis, ‘ymargin’: y-axis, ‘margin’: x and/or y-axis.) - ax: None or matplotlib axis object
- the Axes on which to set the margin. None –> ax=plt.gca().
- plot_settings: None or PlotSettings instance
- if margin is None, get from plot_settings (or matplotlib defaults if None in plot_settings)
- data_interval: None or [min, max]
- if provided, use this instead of the actual range of data from the plot.
- skipna: bool
- whether to return None instead of nan if min or max would be nan.
- scale: None, ‘linear’, or ‘log’
- whether margin is in linear or log space. If None, use ax’s current scale.
returns the new plt.ylim()