lims

File purpose: plot limits, e.g. vlims, xlim, ylim.

Functions

_get_margin_default(*[, margin, x, ...])

return the margin to use, based on margin and plot_settings.

_get_scale_default(*, scale, x[, ax])

returns the scale to use, based on scale, x, and ax.

calculate_lims_from_margin(min, max[, ...])

calculate the lims to use, based on min, max, and margin.

calculate_vlims(values, *[, vmin, vmax, ...])

return the calculated vmin, vmax, for all of these values.

get_data_aspect([ax])

returns the aspect ratio of the data,

get_data_interval(x[, ax])

return the minimum interval containing all data on the plot axes.

get_lims_with_margin([margin, ax, ...])

returns lims to use for axis x, based on margin and the current data interval.

plt_set_aspect(aspect, *[, ax])

sets the aspect of the plot to the specified aspect.

plt_zoom([x, margin, ax, plot_settings, ...])

zoom in/out to view the data with the specified margin.

plt_zoomx([margin, ax, plot_settings, ...])

zoom in/out along the x axis.

plt_zoomy([margin, ax, plot_settings, ...])

zoom in/out along the y axis.

set_lims_if_provided(plot_settings, *[, ax])

sets plt.xlim and/or plt.ylim, if they are non-None in plot_settings.

set_margins_if_provided(plot_settings, *[, ax])

sets the margins for a plot, if they are non-None in plot_settings.

update_vlims(values, d, *[, in_place])

calculate vmin, vmax of values, and return copy of d updated appropriately.