set_y_axis#

popo.plotting.line_style.set_y_axis(ax, *arrays, eps_frac=0.04, nbins=4, floor=None, cap=None, unit_interval=False, from_zero=False)#

Y-limits and ticks from the plotted data.

With lo = min - eps and hi = max + eps (eps = eps_frac of the data range), the tick step is a round step giving about nbins intervals; the top is hi rounded up to the step and the bottom lo rounded down to half the step, and ticks sit at the multiples of the step inside the axis, e.g. data 14.6 to 71.4 -> axis 10 to 80, ticks 20, 40, 60, 80.

unit_interval fixes the axis to [0, 1] (ticks 0, 0.25, …, 1) for a rate bounded by 0 and 1 (coverage, NMPI, CWE); from_zero starts the axis at 0 for a non-negative quantity whose natural floor is zero (an error or a width). floor/cap bound the limits otherwise.

Return type:

None