@@ -5,8 +5,8 @@ Welcome to Matplotlib Sphinx Theme's documentation!
5
5
:maxdepth: 2
6
6
:caption: Contents:
7
7
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
10
10
styling and a navigation bar.
11
11
12
12
When 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
25
25
26
26
navbar_start = mpl_navbar_logo.html
27
27
navbar_center = mpl_nav_bar.html
28
- navbar_end = mpl_icon_links.html
28
+ navbar_end = mpl_icon_links.html
29
29
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 ``.
33
33
34
34
To change the top navbar, edit ``mpl_sphinx_theme/mpl_nav_bar.html ``
35
35
36
36
To change the social icons, edit ``mpl_sphinx_theme/mpl_icon_links.html ``
37
37
38
38
To change the style, edit ``mpl_sphinx_theme/static/css/style.css ``
39
39
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
41
78
42
79
.. literalinclude :: conf.py
0 commit comments