Skip to content

Commit b2dd5a7

Browse files
authored
Merge pull request #26299 from meeseeksmachine/auto-backport-of-pr-26195-on-v3.7.2-doc
Backport PR #26195 on branch v3.7.2-doc ([Doc] link style sheets reference to customization tutorial)
2 parents cae6ab2 + 6899ea8 commit b2dd5a7

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

doc/api/style_api.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ the builtin styles.
2020
.. imported variables have to be specified explicitly due to
2121
https://github.com/sphinx-doc/sphinx/issues/6607
2222
23-
.. data:: matplotlib.style.library
23+
.. data:: library
2424

25-
A dict mapping from style name to `.RcParams` defining that style.
25+
A dict mapping from style name to `.rcParams` defining that style.
2626

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

29-
.. data:: matplotlib.style.available
29+
.. data:: available
3030

3131
List of the names of the available styles.
3232

examples/style_sheets/style_sheets_reference.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@
55
66
This script demonstrates the different available style sheets on a
77
common set of example plots: scatter plot, image, bar graph, patches,
8-
line plot and histogram,
8+
line plot and histogram.
99
10+
Any of these style sheets can be imported (i.e. activated) by its name.
11+
For example for the ggplot style:
12+
13+
>>> plt.style.use('ggplot')
14+
15+
The names of the available style sheets can be found
16+
in the list `matplotlib.style.available`
17+
(they are also printed in the corner of each plot below).
18+
19+
See more details in :ref:`Customizing Matplotlib
20+
using style sheets<customizing-with-style-sheets>`.
1021
"""
1122

1223
import numpy as np

0 commit comments

Comments
 (0)