reVReports.utilities.plots.autoscale_y#
- autoscale_y(ax, margin=0.1)[source]#
Rescale the y-axis to fit the subset of data that is visible
Rescaling is done based on the current limited of the x-axis.
- Parameters:
ax (
matplotlib.axes.Axes) – (sub-)Plot axes of matplotlib image.margin (
float, optional) – Padding to use in setting the y limits. By default 0.1, which means 10% of the range of the data subset’s y-values.