_get_margin_default
- PlasmaCalcs.plotting.plot_tools.lims._get_margin_default(*, margin=None, x=None, plot_settings=None)
return the margin to use, based on margin and plot_settings.
- margin: None or number
- the margin to use. returned immediately if not None.if necessary, get it from matplotlib defaults, or from plot_settings if possible.raise InputError if failed to get margin.
- x: None, ‘x’, or ‘y’
- get ‘{x}margin’ from plot_settings. (‘margin’ if x is None)Or, from matplotlib defaults.
- plot_settings: None or PlotSettings
- get margin from plot_settings if provided, and margin is None.if plot_settings.get(f’{x}margin’ is None, also try getting plot_settings.get(‘margin’).if that is also None, get from matplotlib defaults.