Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02d2e13

Browse files
authored
Merge pull request #26195 from pierre-haessig/doc-stylesheet-use
[Doc] link style sheets reference to customization tutorial
2 parents 49f9ab8 + f826983 commit 02d2e13

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

doc/api/style_api.rst

Lines changed: 3 additions & 3 deletions
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

galleries/examples/style_sheets/style_sheets_reference.py

Lines changed: 12 additions & 1 deletion
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 matplotlib.pyplot as plt

0 commit comments

Comments
 (0)