Configurator

class Configurator(local=True, user=True, default=True, **kwargs)[source]

Bases: collections.abc.MutableMapping, dict

A dictionary-like class for managing matplotlib settings stored in rc_matplotlib and ProPlot settings stored in rc_proplot. This class is instantiated as the rc object on import. See the user guide for details.

Parameters
  • local (bool, optional) – Whether to load settings from the local_files file. Default is True.

  • user (bool, optional) – Whether to load settings from the user_file file. Default is True.

  • default (bool, optional) – Whether to reload built-in default ProPlot settings. Default is True.

Attributes Summary

changed

A dictionary of settings that have been changed from the ProPlot defaults.

Methods Summary

__getattr__(attr)

Return a setting from rc_matplotlib or rc_proplot.

__getitem__(key)

Return a setting from rc_matplotlib or rc_proplot.

__setattr__(attr, value)

Modify an rc_matplotlib setting or an rc_proplot setting.

__setitem__(key, value)

Modify an rc_matplotlib setting or an rc_proplot 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.

find(key, *[, context])

Return a single setting.

load(path)

Load settings from the specified file.

local_files()

Return locations of local proplotrc files in this directory and in parent directories.

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.

user_file()

Return location of the default proplotrc file.

user_folder([subfolder])

Return location of the default proplot folder.