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

Skip to content

Commit eb35ad3

Browse files
authored
Merge pull request #21052 from meeseeksmachine/auto-backport-of-pr-20867-on-v3.5.x
Backport PR #20867 on branch v3.5.x ("inner" index reorganization)
2 parents 248cb6b + a99befa commit eb35ad3

16 files changed

+198
-70
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
2-
github: [numfocus]
2+
github: [matplotlib, numfocus]
33
custom: https://numfocus.org/donate-to-matplotlib

doc/_static/mpl.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,11 @@ table.property-table th,
212212
table.property-table td {
213213
padding: 4px 10px;
214214
}
215+
216+
.donate-button {
217+
margin: 1em 0;
218+
}
219+
220+
.sphinxsidebarwrapper {
221+
margin: 0 1em;
222+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
<div class="sphinxsidebarwrapper">
3+
<h3>Matplotlib cheatsheets</h3>
4+
<a href="https://github.com/matplotlib/cheatsheets#cheatsheets">
5+
<img src="_static/mpl_cheatsheet1.png"
6+
alt="Matplotlib cheatsheets"
7+
srcset="_static/mpl_cheatsheet1.png 1x, _static/mpl_cheatsheet1_2x.png 2x"/>
8+
</a>
9+
</div>

doc/_templates/donate_sidebar.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22

33

4-
<div id="sidebar-donations">
5-
<a href="https://numfocus.org/donate-to-matplotlib" target="_blank"> <span class="mpl-button donate_button" >Support Matplotlib</span></a>
4+
<div id="sidebar-donations" class="donate-button">
5+
<a href="https://numfocus.org/donate-to-matplotlib" target="_blank">
6+
<span class="mpl-button" >Support Matplotlib</span>
7+
</a>
68
</div>

doc/_templates/mpl_nav_bar.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<ul id="navbar-main-elements" class="navbar-nav">
2+
3+
<li class="nav-item">
4+
<a class="reference internal nav-link" href="{{ pathto('plot_types/index') }}">Plot Types</a>
5+
</li>
6+
<li class="nav-item">
7+
<a class="reference internal nav-link" href="{{ pathto('gallery/index') }}">Examples</a>
8+
</li>
9+
<li class="nav-item">
10+
<a class="reference internal nav-link" href="{{ pathto('tutorials/index') }}">Tutoraials</a>
11+
</li>
12+
<li class="nav-item">
13+
<a class="reference internal nav-link" href="{{ pathto('api/index') }}">Reference</a>
14+
</li>
15+
<li class="nav-item">
16+
<a class="reference internal nav-link" href="{{ pathto('contents') }}">Usage Guide</a>
17+
</li>
18+
<li class="nav-item">
19+
<a class="reference internal nav-link" href="{{ pathto('devel/index') }}">Develop</a>
20+
</li>
21+
<li class="nav-item">
22+
<a class="reference internal nav-link" href="{{ pathto('users/release_notes') }}">Release Notes</a>
23+
</li>
24+
</ul>

doc/_templates/sidebar_versions.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,3 @@
3636
getSnippet('other_versions', '/versions.html');
3737
</script>
3838
</div>
39-
40-
<div class="sphinxsidebarwrapper">
41-
<h3>Matplotlib cheatsheets</h3>
42-
<a href="https://github.com/matplotlib/cheatsheets#cheatsheets">
43-
<img src="_static/mpl_cheatsheet1.png"
44-
alt="Matplotlib cheatsheets"
45-
srcset="_static/mpl_cheatsheet1.png 1x, _static/mpl_cheatsheet1_2x.png 2x"/>
46-
</a>
47-
</div>

doc/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,15 @@
7171
'sphinxext.skip_deprecated',
7272
'sphinxext.redirect_from',
7373
'sphinx_copybutton',
74+
'sphinx_panels',
7475
]
7576

7677
exclude_patterns = [
7778
'api/prev_api_changes/api_changes_*/*',
7879
]
7980

81+
panels_add_bootstrap_css = False
82+
8083

8184
def _check_dependencies():
8285
names = {
@@ -312,8 +315,9 @@ def _check_dependencies():
312315
"url": "https://twitter.com/matplotlib/",
313316
"icon": "fab fa-twitter-square",
314317
},
315-
316318
],
319+
"show_prev_next": False,
320+
"navbar_center": ["mpl_nav_bar.html"],
317321
}
318322
include_analytics = False
319323
if include_analytics:
@@ -341,8 +345,10 @@ def _check_dependencies():
341345
# Custom sidebar templates, maps page names to templates.
342346
html_sidebars = {
343347
"index": [
348+
'search-field.html',
344349
# 'sidebar_announcement.html',
345350
"sidebar_versions.html",
351+
"cheatsheet_sidebar.html",
346352
"donate_sidebar.html",
347353
],
348354
# '**': ['localtoc.html', 'pagesource.html']

doc/contents.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
.. _complete_sitemap:
22

33
Contents
44
========
@@ -15,13 +15,10 @@ Contents
1515
:maxdepth: 2
1616

1717
users/installing.rst
18-
plot_types/index.rst
19-
gallery/index.rst
20-
tutorials/index.rst
21-
api/index.rst
2218
users/index.rst
19+
users/backmatter.rst
2320
devel/index.rst
24-
Third-party packages <https://matplotlib.org/mpl-third-party/>
21+
users/release_notes.rst
2522

2623
.. only:: html
2724

doc/faq/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _faq-index:
22

3-
##################
4-
The Matplotlib FAQ
5-
##################
3+
######
4+
How-to
5+
######
66

77
.. only:: html
88

doc/index.rst

Lines changed: 95 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,109 @@
44

55
.. module:: matplotlib
66

7-
Matplotlib documentation
8-
------------------------
97

10-
Release: |release|
8+
Matplotlib |release| documentation
9+
----------------------------------
1110

1211
Matplotlib is a comprehensive library for creating static, animated,
1312
and interactive visualizations in Python.
1413

15-
Learn
16-
=====
17-
18-
- :doc:`Quick-start Guide <tutorials/introductory/usage>`
19-
- Basic :doc:`Plot Types <plot_types/index>` and :doc:`Example Gallery <gallery/index>`
20-
- `Introductory Tutorials <../tutorials/index.html#introductory>`_
21-
- :doc:`External Learning Resources <resources/index>`
22-
23-
Reference
24-
=========
14+
Installation
15+
============
2516

26-
- :doc:`API Reference <api/index>`
17+
.. panels::
18+
:card: + install-card
19+
:column: col-lg-6 col-md-6 col-sm-12 col-xs-12 p-3
2720

28-
- :doc:`pyplot API <api/pyplot_summary>`: top-level interface to create
29-
Figures (`.pyplot.figure`) and Subplots (`.pyplot.subplots`,
30-
`.pyplot.subplot_mosaic`)
31-
- :doc:`Axes API <api/axes_api>` for *most* plotting methods
32-
- :doc:`Figure API <api/figure_api>` for figure-level methods
21+
Installing using `conda <https://docs.continuum.io/anaconda/>`__
22+
^^^^^^^^^^^^^^^^^^^^^^
3323

34-
How-tos
35-
=======
3624

37-
- :doc:`Installation Guide <users/installing>`
38-
- :doc:`Contributing to Matplotlib <devel/index>`
39-
- :doc:`Matplotlib FAQ <faq/index>`
4025

41-
Understand how Matplotlib works
42-
===============================
26+
.. code-block:: bash
4327
44-
- Many of the :doc:`Tutorials <tutorials/index>` have explanatory material
28+
conda install matplotlib
29+
30+
---
31+
32+
Installing using `pip <https://pypi.org/project/matplotlib>`__
33+
^^^^^^^^^^^^^^^^^^^^
34+
35+
36+
.. code-block:: bash
37+
38+
pip install matplotlib
39+
40+
41+
Further details are available in the :doc:`Installation Guide <users/installing>`.
42+
43+
44+
Learning resources
45+
==================
46+
47+
48+
.. panels::
49+
50+
Tutorials
51+
^^^^^^^^^
52+
53+
- :doc:`Quick-start Guide <tutorials/introductory/usage>`
54+
- :doc:`Plot Types <plot_types/index>`
55+
- `Introductory Tutorials <../tutorials/index.html#introductory>`_
56+
- :doc:`External Learning Resources <resources/index>`
57+
58+
---
59+
60+
How-tos
61+
^^^^^^^
62+
- :doc:`Example Gallery <gallery/index>`
63+
- :doc:`Matplotlib FAQ <faq/index>`
64+
65+
---
66+
67+
Understand how Matplotlib works
68+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69+
70+
- The :ref:`users-guide-explain` section of the :doc:`Users guide <users/index>`
71+
- Many of the :ref:`Intermediate <tutorials-intermediate>` and
72+
:ref:`Advanced <tutorials-advanced>` Tutorials
73+
have explanatory material
74+
75+
---
76+
77+
Reference
78+
^^^^^^^^^
79+
80+
- :doc:`API Reference <api/index>`
81+
- :doc:`Axes API <api/axes_api>` for *most* plotting methods
82+
- :doc:`Figure API <api/figure_api>` for figure-level methods
83+
- Top-level interfaces to create:
84+
85+
- Figures (`.pyplot.figure`)
86+
- Subplots (`.pyplot.subplots`, `.pyplot.subplot_mosaic`)
87+
88+
89+
90+
Third-party packages
91+
--------------------
92+
93+
There are many `Third-party packages
94+
<https://matplotlib.org/mpl-third-party/>`_ built on top of and extending
95+
Matplotlib.
96+
97+
98+
Contributing
99+
------------
100+
101+
Matplotlib is a community project maitained for and by its users. There are many ways
102+
you can help!
103+
104+
- Help other users `on discourse <https://discourse.matplotlib.org>`__
105+
- report a bug or request a feature `on GitHub <https://github.com/matplotlib/matplotlib/issues>`__
106+
- or improve the :ref:`documentation and code <developers-guide-index>`
107+
108+
109+
Site map
110+
--------
111+
112+
The :ref:`complete contents of the docs <complete_sitemap>`.

doc/users/backmatter.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
Project Information
3+
-------------------
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
license.rst
9+
../citing.rst
10+
credits.rst
11+
history.rst

doc/users/explain.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _users-guide-explain:
2+
3+
Explanations
4+
------------
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
interactive.rst
10+
fonts.rst

doc/users/fonts.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Fonts in Matplotlib Text Engine
1+
Fonts in Matplotlib text engine
22
===============================
33

44
Matplotlib needs fonts to work with its text engine, some of which are shipped
55
alongside the installation. However, users can configure the default fonts, or
6-
even provide their own custom fonts! For more details, see :doc:`Customizing
6+
even provide their own custom fonts! For more details, see :doc:`Customizing
77
text properties </tutorials/text/text_props>`.
88

99
However, Matplotlib also provides an option to offload text rendering to a TeX
1010
engine (``usetex=True``),
1111
see :doc:`Text rendering with LaTeX </tutorials/text/usetex>`.
1212

13-
Font Specifications
13+
Font specifications
1414
-------------------
1515
Fonts have a long and sometimes incompatible history in computing, leading to
1616
different platforms supporting different types of fonts. In practice, there are
@@ -40,7 +40,7 @@ fonts', more about which is explained later in the guide):
4040
NOTE: Adobe will disable support for authoring with Type 1 fonts in
4141
January 2023. `Read more here. <https://helpx.adobe.com/fonts/kb/postscript-type-1-fonts-end-of-support.html>`_
4242

43-
Special Mentions
43+
Special mentions
4444
^^^^^^^^^^^^^^^^
4545
Other font specifications which Matplotlib supports:
4646

doc/users/index.rst

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
.. _users-guide-index:
22

3-
############
4-
User's guide
5-
############
3+
###########
4+
Usage Guide
5+
###########
66

77
.. only:: html
88

99
:Release: |version|
1010
:Date: |today|
1111

12+
13+
14+
1215
.. toctree::
13-
:maxdepth: 2
14-
15-
interactive.rst
16-
fonts.rst
17-
release_notes.rst
18-
license.rst
19-
../citing.rst
20-
../resources/index.rst
21-
../faq/index.rst
22-
credits.rst
23-
history.rst
16+
:maxdepth: 2
17+
18+
../plot_types/index.rst
19+
../tutorials/index.rst
20+
../gallery/index.rst
21+
explain.rst
22+
../faq/index.rst
23+
../api/index.rst
24+
../resources/index.rst

examples/user_interfaces/test.bmp

781 KB
Binary file not shown.

requirements/doc/doc-requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ colorspacious
1212
ipython
1313
ipywidgets
1414
numpydoc>=0.8
15-
pydata-sphinx-theme>=0.5.0
15+
pydata-sphinx-theme>=0.6.0
1616
sphinxcontrib-svg2pdfconverter>=1.1.0
17-
# sphinx-gallery>=0.7
18-
# b41e328 is PR 808 which adds the image_srcset directive. When this is
17+
# sphinx-gallery>=0.7
18+
# b41e328 is PR 808 which adds the image_srcset directive. When this is
1919
# released with sphinx gallery, we can change to the last release w/o this feature:
2020
# sphinx-gallery>0.90
2121
git+git://github.com/sphinx-gallery/sphinx-gallery@b41e328#egg=sphinx-gallery
2222
sphinx-copybutton
23+
sphinx-panels
2324
scipy

0 commit comments

Comments
 (0)