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 inrc_proplot
. This class is instantiated as therc
object on import. See the user guide for details.- Parameters
local (
bool
, optional) – Whether to load settings from thelocal_files
file. Default isTrue
.user (
bool
, optional) – Whether to load settings from theuser_file
file. Default isTrue
.default (
bool
, optional) – Whether to reload built-in default proplot settings. Default isTrue
.
Attributes Summary
A dictionary of settings that have been changed from the proplot defaults.
Methods Summary
__getattr__
(attr)Return an
rc_matplotlib
orrc_proplot
setting.__getitem__
(key)Return an
rc_matplotlib
orrc_proplot
setting.__setattr__
(attr, value)Modify an
rc_matplotlib
orrc_proplot
setting.__setitem__
(key, value)Modify an
rc_matplotlib
orrc_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.
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.
Return location of the default proplotrc file.
user_folder
([subfolder])Return location of the default proplot folder.