plots.schemas

Attributes

RCPARAMS

schema

Exceptions

SchemaNotFoundError

File not found.

Classes

Schema

Class for containing and maintaining global style settings.

Module Contents

plots.schemas.RCPARAMS = ['backends', 'lines', 'patches', 'hatches', 'font', 'text', 'latex', 'axes', 'dates', 'xtick',...
class plots.schemas.Schema(parent=None, **kwargs)

Bases: dict

Class for containing and maintaining global style settings.

PROTECTED_KEYS = ['_parent']
apply(*keys)
get(key)

Get the value of a schema key.

Parameters:

key (str) – The name of the schema key to get.

Example

>>> schema.set(font="verdana")
>>> schema.get("font")
'verdana'
parsers
set(**kwargs)

Set the value of a schema key.

Parameters:

**kwargs – The schema keys and values to set.

Example

>>> schema.set(font="verdana")
>>> with schema.set(font="comic sans"):
...     print(schema.font)
...
comic sans
>>> print(schema.font)
verdana
use(name)

Use a named schema.

Parameters:

name (str) – The name of the schema to use, or path to a user-implemented schema.

Example

>>> schema.use("default")
>>> schema.use("~/custom.yaml")
exception plots.schemas.SchemaNotFoundError

Bases: FileNotFoundError

File not found.

plots.schemas.schema