You are reading an old version of the documentation (v1.4.3). For the latest version see https://matplotlib.org/stable/api/style_api.html

We're updating the default styles for Matplotlib 2.0

Learn what to expect in the new updates

matplotlib

Table Of Contents

Previous topic

spines

Next topic

text

This Page

style

matplotlib.style

matplotlib.style.context(*args, **kwds)

Context manager for using style settings temporarily.

Parameters:

name : str or list of str

Name of style or path/URL to a style file. For a list of available style names, see style.available. If given a list, each style is applied from first to last in the list.

after_reset : bool

If True, apply style after resetting settings to their defaults; otherwise, apply style on top of the current settings.

matplotlib.style.reload_library()

Reload style library.

matplotlib.style.use(name)

Use matplotlib style settings from a known style sheet or from a file.

Parameters:

name : str or list of str

Name of style or path/URL to a style file. For a list of available style names, see style.available. If given a list, each style is applied from first to last in the list.

matplotlib.style.library

Dictionary of available styles

matplotlib.style.available

List of available styles