# eunoia.options

Python · 0.6.0

[Source](<https://github.com/jolars/eunoia-py/blob/af16491d64a6d1f3b87b8645bd9697593daa0f02/python/eunoia/_options.py>)

```python
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`](<63add39c59bd0d29dc6904d8c480c5766f9f3b4c70f8c67fcec58e95fc48da1e>)). 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:

```python
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`.
