Skip to content

Commit 7b68dba

Browse files
committed
tried to address some of @jklymak's concerns
1 parent 8a61ea0 commit 7b68dba

File tree

3 files changed

+84
-218
lines changed

3 files changed

+84
-218
lines changed

doc/index.rst

Lines changed: 80 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -11,151 +11,141 @@ Matplotlib |release| documentation
1111
Matplotlib is a comprehensive library for creating static, animated,
1212
and interactive visualizations in Python.
1313

14-
.. raw:: html
14+
.. grid:: 1 1 2 2
1515

16-
<div class="grid__intro" id="image_rotator"></div>
16+
.. grid-item::
1717

18+
.. raw:: html
1819

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>
2121

22-
.. toctree::
23-
:maxdepth: 2
22+
.. grid-item::
23+
24+
.. toctree::
25+
:maxdepth: 2
26+
27+
plot_types/index.rst
2428

25-
plot_types/index.rst
2629

2730
Install
2831
=======
2932

30-
.. card::
33+
.. grid:: 1 1 2 2
3134

32-
.. tab-set::
35+
.. grid-item-card:: Try this first!
3336

34-
.. tab-item:: Install using pip:
37+
.. tab-set::
3538

36-
.. code-block:: bash
39+
.. tab-item:: pip
3740

38-
pip install matplotlib
41+
.. code-block:: bash
3942
40-
.. tab-item:: Install using conda:
43+
pip install matplotlib
4144
42-
.. code-block:: bash
45+
.. tab-item:: conda
4346

44-
conda install -c conda-forge matplotlib
47+
.. code-block:: bash
4548
49+
conda install -c conda-forge matplotlib
4650
47-
For more complex installations, see
51+
Make first plot: :ref:`quick start <quick_start>`!
4852

49-
.. toctree::
50-
:maxdepth: 2
53+
.. grid-item::
54+
55+
.. toctree::
56+
:maxdepth: 2
5157

52-
users/installing/index.rst
58+
users/installing/index.rst
5359

60+
Learn
61+
=====
5462

55-
Explanations and Reference
56-
==========================
63+
.. card:: How to use Matplotlib?
5764

58-
.. plot::
65+
.. grid:: 1 1 2 2
5966

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::
6668

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
8471

72+
users/explain/quick_start.rst
73+
users/index.rst
74+
tutorials/index.rst
75+
users/faq/index.rst
8576

86-
.. grid:: 1 1 2 2
8777

88-
.. grid-item-card:: User Guide and Tutorials
78+
.. grid-item::
8979

90-
.. toctree::
91-
:maxdepth: 1
80+
.. toctree::
81+
:maxdepth: 1
9282

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>
9787

9888

99-
.. grid-item-card:: Examples and Reference
89+
Ecosystem
90+
=========
10091

101-
.. toctree::
102-
:maxdepth: 1
92+
.. grid:: 1 1 2 2
93+
94+
.. grid-item-card::
10395

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/>`_
10897

98+
Custom, domain specific and experimental features, such as
99+
styling, alternative APIs, specialized plot types, backends and
100+
helper methods.
109101

110-
External resources
111-
==================
102+
.. grid-item::
112103

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
116106

117-
`Third-party packages <https://matplotlib.org/mpl-third-party/>`_
107+
users/resources/index.rst
118108

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+
=====
121114

122115
.. toctree::
123116
:maxdepth: 2
124117

125-
users/resources/index.rst
118+
users/project/index.rst
126119

127120

128121
Contribute
129122
==========
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:
132123

124+
.. grid:: 1 1 2 2
133125

134-
.. toctree::
135-
:maxdepth: 2
136-
137-
devel/index.rst
126+
.. grid-item::
138127

128+
Matplotlib is a community project maintained for and by
129+
its users and contributions of all kinds are very appreciated.
139130

140-
Release Notes
141-
=============
131+
.. grid-item::
132+
.. toctree::
133+
:maxdepth: 2
142134

143-
Check the release notes for new features and API changes:
135+
devel/index.rst
144136

145-
.. toctree::
146-
:maxdepth: 2
147137

148-
users/release_notes.rst
138+
Releases
139+
========
149140

150-
About
151-
=====
152-
153-
.. toctree::
154-
:maxdepth: 2
141+
.. grid:: 1 1 2 2
155142

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.
157146

158-
.. toctree::
159-
:hidden:
147+
.. grid-item::
148+
.. toctree::
149+
:maxdepth: 2
160150

161-
users/getting_started/index.rst
151+
users/release_notes.rst

galleries/tutorials/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ a :ref:`FAQ <faq-index>` in our :ref:`user guide <users-guide-index>`.
115115
User guide tutorials
116116
--------------------
117117

118-
Many of our tutorials were moved from this section to :ref:`users-guide-explain`:
118+
Many of our tutorials were moved from this section to :ref:`users-guide-index`:
119119

120120
Introductory
121121
~~~~~~~~~~~~

galleries/users_explain/index.rst

Lines changed: 3 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,5 @@
11
.. _users-guide-explain:
2-
.. _users-guide-using:
3-
.. _users-guide-index:
42

5-
6-
.. redirect-from:: /users/explain
7-
.. redirect-from:: /contents
8-
9-
Using Matplotlib
10-
================
11-
12-
13-
.. grid:: 1 1 2 2
14-
15-
.. grid-item::
16-
17-
.. image:: ../../_static/anatomy.png
18-
19-
20-
.. grid-item:: Parts of the figure
21-
22-
:class:`~matplotlib.artist.Artist`: Almost every visual element is managed
23-
via a corresponding `~.Artist` object (or subclass) thatof that element.
24-
25-
:class:`~matplotlib.figure.Figure`: A `~.Figure`` is roughly the total
26-
drawing area and keeps track of the child :class:`~matplotlib.axes.Axes`,
27-
figure related artists such as titles, figure legends, colorbars, and
28-
nested subfigures.
29-
30-
:class:`~matplotlib.axes.Axes`: An `~.Axes` object manages a plotting
31-
region. The `~.Axes` class contains most of the plotting methods, e.g.
32-
``ax.plot()`` is the `~.Axes.plot` method.
33-
34-
35-
:class:`~matplotlib.axis.Axis`: The `.Axis` objects manage the
36-
coordinate systems of the Axes by keeping track of the scales and limits
37-
and storing the location and labeling of the tick marks on each Axis.
38-
39-
.. grid:: 1 1 2 2
40-
41-
.. grid-item-card::
42-
:padding: 2
43-
44-
.. toctree::
45-
:maxdepth: 2
46-
:includehidden:
47-
48-
quick_start
49-
50-
.. grid-item-card::
51-
:padding: 2
52-
53-
.. toctree::
54-
:maxdepth: 2
55-
:includehidden:
56-
57-
figure/index
58-
59-
.. grid-item-card::
60-
:padding: 2
61-
62-
.. toctree::
63-
:maxdepth: 2
64-
:hidden:
65-
66-
axes/index
67-
68-
.. grid-item-card::
69-
:padding: 2
70-
71-
.. toctree::
72-
:maxdepth: 2
73-
:includehidden:
74-
75-
artists/index
76-
77-
.. grid-item-card::
78-
:padding: 2
79-
80-
.. toctree::
81-
:maxdepth: 2
82-
:includehidden:
83-
84-
customizing
85-
86-
.. grid-item-card::
87-
:padding: 2
88-
89-
.. toctree::
90-
:maxdepth: 2
91-
:includehidden:
92-
93-
axis/index
94-
95-
.. grid-item-card::
96-
:padding: 2
97-
98-
.. toctree::
99-
:maxdepth: 2
100-
:includehidden:
101-
102-
colors/index
103-
104-
.. grid-item-card::
105-
:padding: 2
106-
107-
.. toctree::
108-
:maxdepth: 2
109-
:includehidden:
110-
111-
text/index
112-
113-
.. grid-item-card::
114-
:padding: 2
115-
116-
.. toctree::
117-
:maxdepth: 2
118-
:includehidden:
119-
120-
animations/index
121-
122-
.. grid-item-card::
123-
:padding: 2
124-
125-
.. toctree::
126-
:maxdepth: 2
127-
:includehidden:
128-
129-
toolkits/index
3+
====================
4+
User guide tutorials
5+
====================

0 commit comments

Comments
 (0)