get_axlim

hhpy.plotting.get_axlim(ax: matplotlib.axes._axes.Axes, xy: Optional[str] = None) → Union[tuple, Mapping[KT, VT_co]][source]

Wrapper function to get x limits, y limits or both with one function call

Parameters:
  • ax – The matplotlib.pyplot.Axes object to plot on, defaults to current axis [optional]
  • xy – one of [‘x’, ‘y’, ‘xy’, None]
Returns:

if xy is ‘xy’ or None returns a dictionary else returns x or y lims as tuple