@@ -5,8 +5,8 @@ Welcome to Matplotlib Sphinx Theme's documentation!
55 :maxdepth: 2
66 :caption: Contents:
77
8- This is the official Sphinx theme for Matplotlib documentation.
9- It extends the ``pydata_sphinx_theme `` project, but adds custom
8+ This is the official Sphinx theme for Matplotlib documentation.
9+ It extends the ``pydata_sphinx_theme `` project, but adds custom
1010styling and a navigation bar.
1111
1212When creating a Matplotlib subproject you can include this theme by changing this
@@ -25,18 +25,55 @@ There are three main templates that replace the defaults in ``pydata-sphinx-them
2525
2626 navbar_start = mpl_navbar_logo.html
2727 navbar_center = mpl_nav_bar.html
28- navbar_end = mpl_icon_links.html
28+ navbar_end = mpl_icon_links.html
2929
30- Note that the option ``html_logo `` need not be specified as it is included
31- in ``mpl_sphinx_theme/mpl_navbar_logo.html ``. The logo is stored at
32- ``mpl_sphinx_theme/static/images/logo2.svg ``.
30+ Note that the option ``html_logo `` need not be specified as it is included
31+ in ``mpl_sphinx_theme/mpl_navbar_logo.html ``. The logo is stored at
32+ ``mpl_sphinx_theme/static/images/logo2.svg ``.
3333
3434To change the top navbar, edit ``mpl_sphinx_theme/mpl_nav_bar.html ``
3535
3636To change the social icons, edit ``mpl_sphinx_theme/mpl_icon_links.html ``
3737
3838To change the style, edit ``mpl_sphinx_theme/static/css/style.css ``
3939
40- The full ``conf.py `` is
40+ Example plot
41+ ~~~~~~~~~~~~
42+ .. plot ::
43+ :include-source:
44+ :align: center
45+
46+ import matplotlib.pyplot as plt
47+ import numpy as np
48+
49+ x = np.arange(0, 4, 0.05)
50+ y = np.sin(x*np.pi)
51+
52+ fig, ax = plt.subplots(figsize=(3,2), constrained_layout=True)
53+ ax.plot(x, y)
54+ ax.set_xlabel('t [s]')
55+ ax.set_ylabel('S [V]')
56+ ax.set_title('Sine wave')
57+
58+ .. plot ::
59+ :include-source:
60+ :align: center
61+
62+ import matplotlib.pyplot as plt
63+ import numpy as np
64+
65+ x = np.arange(0, 4, 0.05)
66+
67+ fig, ax = plt.subplots(figsize=(3,2), constrained_layout=True)
68+ ax.pcolormesh(x, x, np.random.randn(len(x)-1, len(x)-1) )
69+ ax.set_xlabel('t [s]')
70+ ax.set_ylabel('S [V]')
71+ ax.set_title('Sine wave')
72+
73+
74+ Configuration for this demo
75+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
76+
77+ The full ``conf.py `` is
4178
4279.. literalinclude :: conf.py
0 commit comments