RcConfigurator

class RcConfigurator(local=True, user=True, default=True)[source]

Bases: object

Dictionary-like class for managing matplotlib’s builtin settings and ProPlot’s added settings. When ProPlot is imported, this class is instantiated as the rc object and the ProPlot default settings and .proplotrc user overrides are applied. See the configuration guide for details.

Parameters
  • local (bool, optional) – Whether to reload .proplotrc settings in this directory and parent directories. Default is True.

  • user (bool, optional) – Whether to reload ~/.proplotrc user settings. Default is True.

  • default (bool, optional) – Whether to reload default proplot settings. Default is True.

Methods Summary

__getattr__(attr)

Pass the attribute to __getitem__ and return the result.

__getitem__(key)

Return a builtin matplotlib setting or a ProPlot added setting.

__setattr__(attr, value)

Pass the attribute and value to __setitem__.

__setitem__(key, value)

Modify a builtin matplotlib setting or a ProPlot added setting.

category(cat, *[, trimcat, context])

Return a dictionary of settings beginning with the substring cat + '.'.

context(*args[, mode, file])

Temporarily modify the rc settings in a “with as” block.

fill(props, *[, context])

Return a dictionary filled with settings whose names match the string values in the input dictionary.

get(key, *[, context])

Return a single setting.

items()

Return an iterator that loops over all setting names and values.

keys()

Return an iterator that loops over all setting names.

load_file(path)

Load settings from the specified file.

reset([local, user, default])

Reset the configurator to its initial state.

save([path, user, comment, backup, description])

Save the current settings to a .proplotrc file.

update(*args, **kwargs)

Update several settings at once with a dictionary and/or keyword arguments.

values()

Return an iterator that loops over all setting values.