polaris.viz.mplstyle_context
- polaris.viz.mplstyle_context(dpi=None)[source]
A context manager that applies the Polaris matplotlib style for the duration of a plot and restores the previous settings afterwards
Matplotlib’s
rcParamsare global to the process, so a step that assigns to them changes the appearance of plots made by any other step running at the same time. Plotting inside this context manager keeps the settings scoped to the plot that needs them.- Parameters:
dpi (int, optional) – Dots per inch for saved figures, overriding the value from the Polaris style file