nested_grid_plotter.align_y_axes_on_values#
- nested_grid_plotter.align_y_axes_on_values(axes: List[Axes], align_values: List[float] | None = None, is_ticks_major: bool = True) List[Any][source]#
Align the ticks of multiple y axes.
A new sets of ticks are computed for each axis in <axes> but with equal length. Source : https://stackoverflow.com/questions/26752464/how-do-i-align-gridlines-for-two-y-axis-scales-using-matplotlib
- Parameters:
axes (List[Axes]) – List of axes objects whose yaxis ticks are to be aligned.
align_values (None or list/tuple) – If not None, should be a list/tuple of floats with same length as <axes>. Values in <align_values> define where the corresponding axes should be aligned up. E.g. [0, 100, -22.5] means the 0 in axes[0], 100 in axes[1] and -22.5 in axes[2] would be aligned up. If None, align (approximately) the lowest ticks in all axes.
is_ticks_major (bool, optional) – Whether to consider only major ticks. The default is True.
- Returns:
new_ticks (list)
- Return type:
a list of new ticks for each axis in <axes>.