The top level matplotlib module

matplotlib.use(arg, warn=True, force=False) [source]

Set the matplotlib backend to one of the known backends.

The argument is case-insensitive. warn specifies whether a warning should be issued if a backend has already been set up. force is an experimental flag that tells matplotlib to attempt to initialize a new backend by reloading the backend module.

Note

This function must be called before importing pyplot for the first time; or, if you are not using pyplot, it must be called before importing matplotlib.backends. If warn is True, a warning is issued if you try and call this after pylab or pyplot have been loaded. In certain black magic use cases, e.g. pyplot.switch_backend(), we are doing the reloading necessary to make the backend switch work (in some cases, e.g., pure image backends) so one can set warn=False to suppress the warnings.

To find out which backend is currently set, see matplotlib.get_backend().

matplotlib.get_backend() [source]

Return the name of the current backend.

matplotlib.rcParams

An instance of RcParams for handling default matplotlib values.

matplotlib.rc_context(rc=None, fname=None) [source]

Return a context manager for managing rc settings.

This allows one to do:

with mpl.rc_context(fname='screen.rc'):
    plt.plot(x, a)
    with mpl.rc_context(fname='print.rc'):
        plt.plot(x, b)
    plt.plot(x, c)

The 'a' vs 'x' and 'c' vs 'x' plots would have settings from 'screen.rc', while the 'b' vs 'x' plot would have settings from 'print.rc'.

A dictionary can also be passed to the context manager:

with mpl.rc_context(rc={'text.usetex': True}, fname='screen.rc'):
    plt.plot(x, a)

The 'rc' dictionary takes precedence over the settings loaded from 'fname'. Passing a dictionary only is also valid. For example a common usage is:

with mpl.rc_context(rc={'interactive': False}):
    fig, ax = plt.subplots()
    ax.plot(range(3), range(3))
    fig.savefig('A.png', format='png')
    plt.close(fig)
matplotlib.rc(group, **kwargs) [source]

Set the current rc params. Group is the grouping for the rc, e.g., for lines.linewidth the group is lines, for axes.facecolor, the group is axes, and so on. Group may also be a list or tuple of group names, e.g., (xtick, ytick). kwargs is a dictionary attribute name/value pairs, e.g.,:

rc('lines', linewidth=2, color='r')

sets the current rc params and is equivalent to:

rcParams['lines.linewidth'] = 2
rcParams['lines.color'] = 'r'

The following aliases are available to save typing for interactive users:

Alias Property
'lw' 'linewidth'
'ls' 'linestyle'
'c' 'color'
'fc' 'facecolor'
'ec' 'edgecolor'
'mew' 'markeredgewidth'
'aa' 'antialiased'

Thus you could abbreviate the above rc command as:

rc('lines', lw=2, c='r')

Note you can use python's kwargs dictionary facility to store dictionaries of default parameters. e.g., you can customize the font rc as follows:

font = {'family' : 'monospace',
        'weight' : 'bold',
        'size'   : 'larger'}

rc('font', **font)  # pass in the font dict as kwargs

This enables you to easily switch between several configurations. Use matplotlib.style.use('default') or rcdefaults() to restore the default rc params after changes.

matplotlib.rc_file(fname) [source]

Update rc params from file.

matplotlib.rcdefaults() [source]

Restore the rc params from Matplotlib's internal defaults.

See also

rc_file_defaults
Restore the rc params from the rc file originally loaded by Matplotlib.
matplotlib.style.use
Use a specific style file. Call style.use('default') to restore the default style.
matplotlib.rc_file_defaults() [source]

Restore the rc params from the original rc file loaded by Matplotlib.

class matplotlib.RcParams(*args, **kwargs) [source]

A dictionary object including validation

validating functions are defined and associated with rc parameters in matplotlib.rcsetup

find_all(pattern) [source]

Return the subset of this RcParams dictionary whose keys match, using re.search(), the given pattern.

Note

Changes to the returned dictionary are not propagated to the parent RcParams dictionary.

msg_backend_obsolete = 'The {} rcParam was deprecated in version 2.2. In order to force the use of a specific Qt binding, either import that binding first, or set the QT_API environment variable.'
msg_depr = '%s is deprecated and replaced with %s; please use the latter.'
msg_depr_ignore = '%s is deprecated and ignored. Use %s instead.'
msg_depr_set = '%s is deprecated. Please remove it from your matplotlibrc and/or style files.'
msg_obsolete = '%s is obsolete. Please remove it from your matplotlibrc and/or style files.'
validate = {'_internal.classic_mode': <function validate_bool at 0x7f2d1eb7d400>, 'agg.path.chunksize': <function validate_int at 0x7f2d1eb7d8c8>, 'animation.avconv_args': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'animation.avconv_path': <function validate_animation_writer_path at 0x7f2d1eb831e0>, 'animation.bitrate': <function validate_int at 0x7f2d1eb7d8c8>, 'animation.codec': <function validate_string at 0x7f2d1eb7c1e0>, 'animation.convert_args': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'animation.convert_path': <function validate_animation_writer_path at 0x7f2d1eb831e0>, 'animation.embed_limit': <function validate_float at 0x7f2d1eb7d598>, 'animation.ffmpeg_args': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'animation.ffmpeg_path': <function validate_animation_writer_path at 0x7f2d1eb831e0>, 'animation.frame_format': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f438>, 'animation.html': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f4e0>, 'animation.html_args': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'animation.writer': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f470>, 'axes.autolimit_mode': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f978>, 'axes.axisbelow': <function validate_axisbelow at 0x7f2d1eb7d7b8>, 'axes.edgecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'axes.facecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'axes.formatter.limits': <matplotlib.rcsetup.validate_nseq_int object at 0x7f2d1eb7f908>, 'axes.formatter.min_exponent': <function validate_int at 0x7f2d1eb7d8c8>, 'axes.formatter.offset_threshold': <function validate_int at 0x7f2d1eb7d8c8>, 'axes.formatter.use_locale': <function validate_bool at 0x7f2d1eb7d400>, 'axes.formatter.use_mathtext': <function validate_bool at 0x7f2d1eb7d400>, 'axes.formatter.useoffset': <function validate_bool at 0x7f2d1eb7d400>, 'axes.grid': <function validate_bool at 0x7f2d1eb7d400>, 'axes.grid.axis': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f518>, 'axes.grid.which': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f4a8>, 'axes.hold': <function deprecate_axes_hold at 0x7f2d1eb7d510>, 'axes.labelcolor': <function validate_color at 0x7f2d1eb7c0d0>, 'axes.labelpad': <function validate_float at 0x7f2d1eb7d598>, 'axes.labelsize': <function validate_fontsize at 0x7f2d1eb7c378>, 'axes.labelweight': <function validate_string at 0x7f2d1eb7c1e0>, 'axes.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'axes.prop_cycle': <function validate_cycler at 0x7f2d1eb830d0>, 'axes.spines.bottom': <function validate_bool at 0x7f2d1eb7d400>, 'axes.spines.left': <function validate_bool at 0x7f2d1eb7d400>, 'axes.spines.right': <function validate_bool at 0x7f2d1eb7d400>, 'axes.spines.top': <function validate_bool at 0x7f2d1eb7d400>, 'axes.titlepad': <function validate_float at 0x7f2d1eb7d598>, 'axes.titlesize': <function validate_fontsize at 0x7f2d1eb7c378>, 'axes.titleweight': <function validate_string at 0x7f2d1eb7c1e0>, 'axes.unicode_minus': <function validate_bool at 0x7f2d1eb7d400>, 'axes.xmargin': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7f9b0>, 'axes.ymargin': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7f9e8>, 'axes3d.grid': <function validate_bool at 0x7f2d1eb7d400>, 'backend': <function validate_backend at 0x7f2d1eb7da60>, 'backend.qt4': <function validate_qt4 at 0x7f2d1eb7dae8>, 'backend.qt5': <function validate_qt5 at 0x7f2d1eb7db70>, 'backend_fallback': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.bootstrap': <function validate_int_or_None at 0x7f2d1eb7d950>, 'boxplot.boxprops.color': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.boxprops.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'boxplot.boxprops.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.capprops.color': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.capprops.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'boxplot.capprops.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.flierprops.color': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.flierprops.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'boxplot.flierprops.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.flierprops.marker': <function validate_string at 0x7f2d1eb7c1e0>, 'boxplot.flierprops.markeredgecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.flierprops.markerfacecolor': <function validate_color_or_auto at 0x7f2d1eb7df28>, 'boxplot.flierprops.markersize': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.meanline': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.meanprops.color': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.meanprops.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'boxplot.meanprops.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.meanprops.marker': <function validate_string at 0x7f2d1eb7c1e0>, 'boxplot.meanprops.markeredgecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.meanprops.markerfacecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.meanprops.markersize': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.medianprops.color': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.medianprops.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'boxplot.medianprops.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.notch': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.patchartist': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.showbox': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.showcaps': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.showfliers': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.showmeans': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.vertical': <function validate_bool at 0x7f2d1eb7d400>, 'boxplot.whiskerprops.color': <function validate_color at 0x7f2d1eb7c0d0>, 'boxplot.whiskerprops.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'boxplot.whiskerprops.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'boxplot.whiskers': <function validate_whiskers at 0x7f2d1eb7c510>, 'contour.corner_mask': <function validate_bool at 0x7f2d1eb7d400>, 'contour.negative_linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'datapath': <function validate_path_exists at 0x7f2d1eb7d378>, 'date.autoformatter.day': <function validate_string at 0x7f2d1eb7c1e0>, 'date.autoformatter.hour': <function validate_string at 0x7f2d1eb7c1e0>, 'date.autoformatter.microsecond': <function validate_string at 0x7f2d1eb7c1e0>, 'date.autoformatter.minute': <function validate_string at 0x7f2d1eb7c1e0>, 'date.autoformatter.month': <function validate_string at 0x7f2d1eb7c1e0>, 'date.autoformatter.second': <function validate_string at 0x7f2d1eb7c1e0>, 'date.autoformatter.year': <function validate_string at 0x7f2d1eb7c1e0>, 'docstring.hardcopy': <function validate_bool at 0x7f2d1eb7d400>, 'errorbar.capsize': <function validate_float at 0x7f2d1eb7d598>, 'examples.directory': <function validate_string at 0x7f2d1eb7c1e0>, 'figure.autolayout': <function validate_bool at 0x7f2d1eb7d400>, 'figure.constrained_layout.h_pad': <function validate_float at 0x7f2d1eb7d598>, 'figure.constrained_layout.hspace': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fba8>, 'figure.constrained_layout.use': <function validate_bool at 0x7f2d1eb7d400>, 'figure.constrained_layout.w_pad': <function validate_float at 0x7f2d1eb7d598>, 'figure.constrained_layout.wspace': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fbe0>, 'figure.dpi': <function validate_float at 0x7f2d1eb7d598>, 'figure.edgecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'figure.facecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'figure.figsize': <matplotlib.rcsetup.validate_nseq_float object at 0x7f2d1eb7fa20>, 'figure.frameon': <function validate_bool at 0x7f2d1eb7d400>, 'figure.max_open_warning': <function validate_int at 0x7f2d1eb7d8c8>, 'figure.subplot.bottom': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fac8>, 'figure.subplot.hspace': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fb70>, 'figure.subplot.left': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fa58>, 'figure.subplot.right': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fa90>, 'figure.subplot.top': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fb00>, 'figure.subplot.wspace': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fb38>, 'figure.titlesize': <function validate_fontsize at 0x7f2d1eb7c378>, 'figure.titleweight': <function validate_string at 0x7f2d1eb7c1e0>, 'font.cursive': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'font.family': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'font.fantasy': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'font.monospace': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'font.sans-serif': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'font.serif': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'font.size': <function validate_float at 0x7f2d1eb7d598>, 'font.stretch': <function validate_string at 0x7f2d1eb7c1e0>, 'font.style': <function validate_string at 0x7f2d1eb7c1e0>, 'font.variant': <function validate_string at 0x7f2d1eb7c1e0>, 'font.weight': <function validate_string at 0x7f2d1eb7c1e0>, 'grid.alpha': <function validate_float at 0x7f2d1eb7d598>, 'grid.color': <function validate_color at 0x7f2d1eb7c0d0>, 'grid.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'grid.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'hatch.color': <function validate_color at 0x7f2d1eb7c0d0>, 'hatch.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'hist.bins': <function validate_hist_bins at 0x7f2d1eb83158>, 'image.aspect': <function validate_aspect at 0x7f2d1eb7c2f0>, 'image.cmap': <function validate_string at 0x7f2d1eb7c1e0>, 'image.composite_image': <function validate_bool at 0x7f2d1eb7d400>, 'image.interpolation': <function validate_string at 0x7f2d1eb7c1e0>, 'image.lut': <function validate_int at 0x7f2d1eb7d8c8>, 'image.origin': <function validate_string at 0x7f2d1eb7c1e0>, 'image.resample': <function validate_bool at 0x7f2d1eb7d400>, 'interactive': <function validate_bool at 0x7f2d1eb7d400>, 'keymap.all_axes': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.back': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.forward': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.fullscreen': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.grid': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.grid_minor': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.home': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.pan': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.quit': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.quit_all': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.save': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.xscale': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.yscale': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'keymap.zoom': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'legend.borderaxespad': <function validate_float at 0x7f2d1eb7d598>, 'legend.borderpad': <function validate_float at 0x7f2d1eb7d598>, 'legend.columnspacing': <function validate_float at 0x7f2d1eb7d598>, 'legend.edgecolor': <function validate_color_or_inherit at 0x7f2d1eb7dc80>, 'legend.facecolor': <function validate_color_or_inherit at 0x7f2d1eb7dc80>, 'legend.fancybox': <function validate_bool at 0x7f2d1eb7d400>, 'legend.fontsize': <function validate_fontsize at 0x7f2d1eb7c378>, 'legend.framealpha': <function validate_float_or_None at 0x7f2d1eb7d6a8>, 'legend.frameon': <function validate_bool at 0x7f2d1eb7d400>, 'legend.handleheight': <function validate_float at 0x7f2d1eb7d598>, 'legend.handlelength': <function validate_float at 0x7f2d1eb7d598>, 'legend.handletextpad': <function validate_float at 0x7f2d1eb7d598>, 'legend.labelspacing': <function validate_float at 0x7f2d1eb7d598>, 'legend.loc': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f2e8>, 'legend.markerscale': <function validate_float at 0x7f2d1eb7d598>, 'legend.numpoints': <function validate_int at 0x7f2d1eb7d8c8>, 'legend.scatterpoints': <function validate_int at 0x7f2d1eb7d8c8>, 'legend.shadow': <function validate_bool at 0x7f2d1eb7d400>, 'lines.antialiased': <function validate_bool at 0x7f2d1eb7d400>, 'lines.color': <function validate_color at 0x7f2d1eb7c0d0>, 'lines.dash_capstyle': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f080>, 'lines.dash_joinstyle': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe1668>, 'lines.dashdot_pattern': <matplotlib.rcsetup.validate_nseq_float object at 0x7f2d1eb7f828>, 'lines.dashed_pattern': <matplotlib.rcsetup.validate_nseq_float object at 0x7f2d1eb7f588>, 'lines.dotted_pattern': <matplotlib.rcsetup.validate_nseq_float object at 0x7f2d1eb7f860>, 'lines.linestyle': <function _validate_linestyle at 0x7f2d1eb832f0>, 'lines.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'lines.marker': <function validate_string at 0x7f2d1eb7c1e0>, 'lines.markeredgewidth': <function validate_float at 0x7f2d1eb7d598>, 'lines.markersize': <function validate_float at 0x7f2d1eb7d598>, 'lines.scale_dashes': <function validate_bool at 0x7f2d1eb7d400>, 'lines.solid_capstyle': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f080>, 'lines.solid_joinstyle': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe1668>, 'markers.fillstyle': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f160>, 'mathtext.bf': <function validate_font_properties at 0x7f2d1eb7c488>, 'mathtext.cal': <function validate_font_properties at 0x7f2d1eb7c488>, 'mathtext.default': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe1588>, 'mathtext.fallback_to_cm': <function validate_bool at 0x7f2d1eb7d400>, 'mathtext.fontset': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe1198>, 'mathtext.it': <function validate_font_properties at 0x7f2d1eb7c488>, 'mathtext.rm': <function validate_font_properties at 0x7f2d1eb7c488>, 'mathtext.sf': <function validate_font_properties at 0x7f2d1eb7c488>, 'mathtext.tt': <function validate_font_properties at 0x7f2d1eb7c488>, 'patch.antialiased': <function validate_bool at 0x7f2d1eb7d400>, 'patch.edgecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'patch.facecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'patch.force_edgecolor': <function validate_bool at 0x7f2d1eb7d400>, 'patch.linewidth': <function validate_float at 0x7f2d1eb7d598>, 'path.effects': <function validate_any at 0x7f2d1eb7d268>, 'path.simplify': <function validate_bool at 0x7f2d1eb7d400>, 'path.simplify_threshold': <matplotlib.rcsetup.ValidateInterval object at 0x7f2d1eb7fc18>, 'path.sketch': <function validate_sketch at 0x7f2d1eb7cbf8>, 'path.snap': <function validate_bool at 0x7f2d1eb7d400>, 'pdf.compression': <function validate_int at 0x7f2d1eb7d8c8>, 'pdf.fonttype': <function validate_fonttype at 0x7f2d1eb7d9d8>, 'pdf.inheritcolor': <function validate_bool at 0x7f2d1eb7d400>, 'pdf.use14corefonts': <function validate_bool at 0x7f2d1eb7d400>, 'pgf.debug': <function validate_bool at 0x7f2d1eb7d400>, 'pgf.preamble': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'pgf.rcfonts': <function validate_bool at 0x7f2d1eb7d400>, 'pgf.texsystem': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1eb7f358>, 'polaraxes.grid': <function validate_bool at 0x7f2d1eb7d400>, 'ps.distiller.res': <function validate_int at 0x7f2d1eb7d8c8>, 'ps.fonttype': <function validate_fonttype at 0x7f2d1eb7d9d8>, 'ps.papersize': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe1630>, 'ps.useafm': <function validate_bool at 0x7f2d1eb7d400>, 'ps.usedistiller': <function validate_ps_distiller at 0x7f2d1eb7c620>, 'savefig.bbox': <function validate_bbox at 0x7f2d1eb7cb70>, 'savefig.directory': <function validate_string at 0x7f2d1eb7c1e0>, 'savefig.dpi': <function validate_dpi at 0x7f2d1eb7d840>, 'savefig.edgecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'savefig.facecolor': <function validate_color at 0x7f2d1eb7c0d0>, 'savefig.format': <function update_savefig_format at 0x7f2d1eb7c598>, 'savefig.frameon': <function validate_bool at 0x7f2d1eb7d400>, 'savefig.jpeg_quality': <function validate_int at 0x7f2d1eb7d8c8>, 'savefig.orientation': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe10f0>, 'savefig.pad_inches': <function validate_float at 0x7f2d1eb7d598>, 'savefig.transparent': <function validate_bool at 0x7f2d1eb7d400>, 'scatter.marker': <function validate_string at 0x7f2d1eb7c1e0>, 'svg.fonttype': <function validate_svg_fonttype at 0x7f2d1eb7c840>, 'svg.hashsalt': <function validate_string_or_None at 0x7f2d1eb7d730>, 'svg.image_inline': <function validate_bool at 0x7f2d1eb7d400>, 'text.antialiased': <function validate_bool at 0x7f2d1eb7d400>, 'text.color': <function validate_color at 0x7f2d1eb7c0d0>, 'text.hinting': <function validate_hinting at 0x7f2d1eb7ca60>, 'text.hinting_factor': <function validate_int at 0x7f2d1eb7d8c8>, 'text.latex.preamble': <function _listify_validator.<locals>.f at 0x7f2d1eb7c268>, 'text.latex.preview': <function validate_bool at 0x7f2d1eb7d400>, 'text.latex.unicode': <function validate_bool at 0x7f2d1eb7d400>, 'text.usetex': <function validate_bool at 0x7f2d1eb7d400>, 'timezone': <function validate_string at 0x7f2d1eb7c1e0>, 'tk.window_focus': <function validate_bool at 0x7f2d1eb7d400>, 'toolbar': <function validate_toolbar at 0x7f2d1eb7dbf8>, 'verbose.fileo': <function validate_string at 0x7f2d1eb7c1e0>, 'verbose.level': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe15c0>, 'webagg.address': <function validate_webagg_address at 0x7f2d1eb83268>, 'webagg.open_in_browser': <function validate_bool at 0x7f2d1eb7d400>, 'webagg.port': <function validate_int at 0x7f2d1eb7d8c8>, 'webagg.port_retries': <function validate_int at 0x7f2d1eb7d8c8>, 'xtick.alignment': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe15f8>, 'xtick.bottom': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.color': <function validate_color at 0x7f2d1eb7c0d0>, 'xtick.direction': <function validate_string at 0x7f2d1eb7c1e0>, 'xtick.labelbottom': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.labelsize': <function validate_fontsize at 0x7f2d1eb7c378>, 'xtick.labeltop': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.major.bottom': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.major.pad': <function validate_float at 0x7f2d1eb7d598>, 'xtick.major.size': <function validate_float at 0x7f2d1eb7d598>, 'xtick.major.top': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.major.width': <function validate_float at 0x7f2d1eb7d598>, 'xtick.minor.bottom': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.minor.pad': <function validate_float at 0x7f2d1eb7d598>, 'xtick.minor.size': <function validate_float at 0x7f2d1eb7d598>, 'xtick.minor.top': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.minor.visible': <function validate_bool at 0x7f2d1eb7d400>, 'xtick.minor.width': <function validate_float at 0x7f2d1eb7d598>, 'xtick.top': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.alignment': <matplotlib.rcsetup.ValidateInStrings object at 0x7f2d1ebe15f8>, 'ytick.color': <function validate_color at 0x7f2d1eb7c0d0>, 'ytick.direction': <function validate_string at 0x7f2d1eb7c1e0>, 'ytick.labelleft': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.labelright': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.labelsize': <function validate_fontsize at 0x7f2d1eb7c378>, 'ytick.left': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.major.left': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.major.pad': <function validate_float at 0x7f2d1eb7d598>, 'ytick.major.right': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.major.size': <function validate_float at 0x7f2d1eb7d598>, 'ytick.major.width': <function validate_float at 0x7f2d1eb7d598>, 'ytick.minor.left': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.minor.pad': <function validate_float at 0x7f2d1eb7d598>, 'ytick.minor.right': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.minor.size': <function validate_float at 0x7f2d1eb7d598>, 'ytick.minor.visible': <function validate_bool at 0x7f2d1eb7d400>, 'ytick.minor.width': <function validate_float at 0x7f2d1eb7d598>, 'ytick.right': <function validate_bool at 0x7f2d1eb7d400>}
matplotlib.rc_params(fail_on_error=False) [source]

Return a matplotlib.RcParams instance from the default matplotlib rc file.

matplotlib.rc_params_from_file(fname, fail_on_error=False, use_default_template=True) [source]

Return matplotlib.RcParams from the contents of the given file.

Parameters:
fname : str

Name of file parsed for matplotlib settings.

fail_on_error : bool

If True, raise an error when the parser fails to convert a parameter.

use_default_template : bool

If True, initialize with default parameters before updating with those in the given file. If False, the configuration class only contains the parameters specified in the file. (Useful for updating dicts.)

matplotlib.matplotlib_fname() [source]

Get the location of the config file.

The file location is determined in the following order

  • $PWD/matplotlibrc
  • $MATPLOTLIBRC if it is a file (or a named pipe, which can be created e.g. by process substitution)
  • $MATPLOTLIBRC/matplotlibrc
  • $MPLCONFIGDIR/matplotlibrc
  • On Linux,

    • $XDG_CONFIG_HOME/matplotlib/matplotlibrc (if $XDG_CONFIG_HOME is defined)
    • or $HOME/.config/matplotlib/matplotlibrc (if $XDG_CONFIG_HOME is not defined)
  • On other platforms,

    • $HOME/.matplotlib/matplotlibrc if $HOME is defined.
  • Lastly, it looks in $MATPLOTLIBDATA/matplotlibrc for a system-defined copy.
matplotlib.interactive(b) [source]

Set interactive mode to boolean b.

If b is True, then draw after every plotting command, e.g., after xlabel

matplotlib.is_interactive() [source]

Return true if plot mode is interactive

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/2.2.3/api/matplotlib_configuration_api.html