Eunoia for Python · python · 0.6.0

eunoia.options

options(**changes: typing.Any) -> dict[str, Any] | _OptionsContext

Get or set global plotting defaults.

Called with no arguments, returns a deep-copied snapshot of the currently effective options (see get_options). Called with one or more category keyword arguments, merges them into the global options and returns a context manager that restores the previous values on exit:

eu.options(fills={"alpha": 0.6})          # persistent global change
with eu.options(labels={"fontsize": 14}):  # scoped change
    fit.plot()

Mapping categories (fills, edges, labels, quantities, members, glyphs, legend, complement) are merged key-by-key with the current values; palette is replaced wholesale. Unknown categories raise ValueError.