reVReports.utilities.plots.autoscale_x#

autoscale_x(ax, margin=0.1)[source]#

Rescale the x-axis to fit the subset of data that is visible

Rescaling is based on the current limited of the y-axis.

Parameters:
  • ax (matplotlib.axes.Axes) – (sub-)Plot axes of matplotlib image.

  • margin (float, optional) – Padding to use in setting the x limits. By default 0.1, which means 10% of the range of the data subset’s x-values.