@@ -11,151 +11,141 @@ Matplotlib |release| documentation
11
11
Matplotlib is a comprehensive library for creating static, animated,
12
12
and interactive visualizations in Python.
13
13
14
- .. raw :: html
14
+ .. grid :: 1 1 2 2
15
15
16
- < div class = " grid__intro " id = " image_rotator " ></ div >
16
+ .. grid-item ::
17
17
18
+ .. raw :: html
18
19
19
- Matplotlib supports building fully custom visualizations and provides common
20
- visualization methods for the following use cases:
20
+ <div class =" grid__intro" id =" image_rotator" ></div >
21
21
22
- .. toctree ::
23
- :maxdepth: 2
22
+ .. grid-item ::
23
+
24
+ .. toctree ::
25
+ :maxdepth: 2
26
+
27
+ plot_types/index.rst
24
28
25
- plot_types/index.rst
26
29
27
30
Install
28
31
=======
29
32
30
- .. card ::
33
+ .. grid :: 1 1 2 2
31
34
32
- .. tab-set ::
35
+ .. grid-item-card :: Try this first!
33
36
34
- .. tab-item :: Install using pip :
37
+ .. tab-set : :
35
38
36
- .. code-block :: bash
39
+ .. tab-item :: pip
37
40
38
- pip install matplotlib
41
+ .. code-block :: bash
39
42
40
- .. tab-item :: Install using conda:
43
+ pip install matplotlib
41
44
42
- .. code-block :: bash
45
+ .. tab-item :: conda
43
46
44
- conda install -c conda-forge matplotlib
47
+ .. code-block :: bash
45
48
49
+ conda install -c conda-forge matplotlib
46
50
47
- For more complex installations, see
51
+ Make first plot: :ref: ` quick start < quick_start >`!
48
52
49
- .. toctree ::
50
- :maxdepth: 2
53
+ .. grid-item ::
54
+
55
+ .. toctree ::
56
+ :maxdepth: 2
51
57
52
- users/installing/index.rst
58
+ users/installing/index.rst
53
59
60
+ Learn
61
+ =====
54
62
55
- Explanations and Reference
56
- ==========================
63
+ .. card :: How to use Matplotlib?
57
64
58
- .. plot ::
65
+ .. grid :: 1 1 2 2
59
66
60
- rng = np.random.default_rng(seed=19680808)
61
- x = np.linspace(0, 4, 1000) # Sample data.
62
- y = rng.normal(size=len(x)) * 1.5 + x**2 + np.cumsum(rng.normal(size=len(x))) / 6
63
- x = x[::10]
64
- y = y[::10]
65
- fig, ax = plt.subplots(figsize=(5, 2.7), layout='constrained')
67
+ .. grid-item ::
66
68
67
- ax.plot(x, x**2, label='underlying data', linewidth=4, alpha=0.6, color='k')
68
- ax.scatter(x, y, s=13 * rng.random(size=len(x)), c=rng.normal(size=len(x)),
69
- label='noisy data')
70
- # p = np.polyfit(x, y, deg=1)
71
- # print(p)
72
- p = np.array([ 3.81283983, -2.00111268])
73
- out = np.polyval(p, x)
74
- ax.plot(x, out, label='linear fit') # Plot some data on the axes.
75
- # p = np.polyfit(x, y, deg=2)
76
- # print(p)
77
- p = np.array([ 1.18076933, -0.86768725, 1.05989268])
78
- out = np.polyval(p, x)
79
- ax.plot(x, out, label='quadratic fit')
80
- ax.set_xlabel('x label')
81
- ax.set_ylabel('y label')
82
- ax.set_title("Simple plot")
83
- ax.legend()
69
+ .. toctree ::
70
+ :maxdepth: 1
84
71
72
+ users/explain/quick_start.rst
73
+ users/index.rst
74
+ tutorials/index.rst
75
+ users/faq/index.rst
85
76
86
- .. grid :: 1 1 2 2
87
77
88
- .. grid-item-card :: User Guide and Tutorials
78
+ .. grid-item ::
89
79
90
- .. toctree ::
91
- :maxdepth: 1
80
+ .. toctree ::
81
+ :maxdepth: 1
92
82
93
- users/explain/quick_start .rst
94
- users/explain/ index.rst
95
- tutorials/index.rst
96
- users/faq/index.rst
83
+ gallery/index .rst
84
+ API reference < api/ index>
85
+ Plotting reference < api/axes_api >
86
+ Figures reference < api/figure_api >
97
87
98
88
99
- .. grid-item-card :: Examples and Reference
89
+ Ecosystem
90
+ =========
100
91
101
- .. toctree ::
102
- :maxdepth: 1
92
+ .. grid :: 1 1 2 2
93
+
94
+ .. grid-item-card ::
103
95
104
- gallery/index.rst
105
- API reference <api/index >
106
- Plotting reference <api/axes_api >
107
- Figures reference <api/figure_api >
96
+ :octicon: `link-external;1em;sd-text-info ` `Third-party packages <https://matplotlib.org/mpl-third-party/ >`_
108
97
98
+ Custom, domain specific and experimental features, such as
99
+ styling, alternative APIs, specialized plot types, backends and
100
+ helper methods.
109
101
110
- External resources
111
- ==================
102
+ .. grid-item ::
112
103
113
- Many packages extend the functionality of Matplotlib, for example by
114
- providing many styling options, alternative APIs, domain specific plot types,
115
- experimental features and backends, and helper methods. These are listed at:
104
+ .. toctree ::
105
+ :maxdepth: 2
116
106
117
- ` Third-party packages < https://matplotlib.org/mpl-third-party/ >`_
107
+ users/resources/index.rst
118
108
119
- There are also a large number of books, videos, and tutorials teaching
120
- Matplotlib:
109
+ `Scientific Python <https://scientific-python.org/ >`_
110
+
111
+
112
+ About
113
+ =====
121
114
122
115
.. toctree ::
123
116
:maxdepth: 2
124
117
125
- users/resources /index.rst
118
+ users/project /index.rst
126
119
127
120
128
121
Contribute
129
122
==========
130
- Matplotlib is a community project maintained for and by its users. To learn more
131
- about contributing, please take a look at the contribution guide:
132
123
124
+ .. grid :: 1 1 2 2
133
125
134
- .. toctree ::
135
- :maxdepth: 2
136
-
137
- devel/index.rst
126
+ .. grid-item ::
138
127
128
+ Matplotlib is a community project maintained for and by
129
+ its users and contributions of all kinds are very appreciated.
139
130
140
- Release Notes
141
- =============
131
+ .. grid-item ::
132
+ .. toctree ::
133
+ :maxdepth: 2
142
134
143
- Check the release notes for new features and API changes:
135
+ devel/index.rst
144
136
145
- .. toctree ::
146
- :maxdepth: 2
147
137
148
- users/release_notes.rst
138
+ Releases
139
+ ========
149
140
150
- About
151
- =====
152
-
153
- .. toctree ::
154
- :maxdepth: 2
141
+ .. grid :: 1 1 2 2
155
142
156
- users/project/index.rst
143
+ .. grid-item ::
144
+ New versions are generally released every 6-8 months.
145
+ New features and API changes are described in the release notes.
157
146
158
- .. toctree ::
159
- :hidden:
147
+ .. grid-item ::
148
+ .. toctree ::
149
+ :maxdepth: 2
160
150
161
- users/getting_started/index .rst
151
+ users/release_notes .rst
0 commit comments