Skip to content

[Doc] link style sheets reference to customization tutorial #26195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/api/style_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ the builtin styles.
.. imported variables have to be specified explicitly due to
https://github.com/sphinx-doc/sphinx/issues/6607

.. data:: matplotlib.style.library
.. data:: library

A dict mapping from style name to `.RcParams` defining that style.
A dict mapping from style name to `.rcParams` defining that style.

This is meant to be read-only. Use `.reload_library` to update.

.. data:: matplotlib.style.available
.. data:: available

List of the names of the available styles.

Expand Down
13 changes: 12 additions & 1 deletion galleries/examples/style_sheets/style_sheets_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@

This script demonstrates the different available style sheets on a
common set of example plots: scatter plot, image, bar graph, patches,
line plot and histogram,
line plot and histogram.

Any of these style sheets can be imported (i.e. activated) by its name.
For example for the ggplot style:

>>> plt.style.use('ggplot')

The names of the available style sheets can be found
in the list `matplotlib.style.available`
(they are also printed in the corner of each plot below).

See more details in :ref:`Customizing Matplotlib
using style sheets<customizing-with-style-sheets>`.
"""

import matplotlib.pyplot as plt
Expand Down