publiplots.rcParams¶
- publiplots.rcParams = <publiplots.themes.rcparams.PubliplotsRcParams object>¶
Unified interface for publiplots parameters.
Dict-like accessor for both standard matplotlib rcParams and publiplots-specific parameters. Mimics matplotlib’s rcParams but also exposes the custom keys listed in this module’s docstring (
alpha,edgecolor,palette,hatch_mode,scatter.size_*,subplots.*). Use the module-levelrcParamsinstance — don’t instantiate this class yourself.Writes are routed automatically: publiplots keys update the publiplots store; everything else is delegated to
matplotlib.pyplot.rcParams. Preferpubliplots.set_hatch_mode()for mutatinghatch_modeso that validation runs.Examples
Read parameters:
>>> import publiplots as pp >>> axes_size = pp.rcParams['subplots.axes_size'] >>> color = pp.rcParams['color'] # publiplots-specific key
Set parameters:
>>> pp.rcParams['subplots.axes_size'] = (80, 50) # mm >>> pp.rcParams['color'] = '#ff0000'
Use with
resolve_param()in a plotting function:>>> from publiplots.themes.rcparams import resolve_param >>> color = resolve_param('color', user_color)
See also
resolve_paramValue-or-default helper used in plot signatures.
publiplots.set_hatch_modeValidated setter for
hatch_mode.