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

Skip to content

Commit 3507c58

Browse files
QuLogicandrew-fennell
authored andcommitted
DOC: Migrate from sphinx-panels to sphinx-design
The former has been deprecated for the latter.
1 parent 5c98c14 commit 3507c58

File tree

6 files changed

+48
-53
lines changed

6 files changed

+48
-53
lines changed

doc/_static/mpl.css

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -256,20 +256,6 @@ table.property-table td {
256256
width: 210px;
257257
}
258258

259-
/* Two columns for install code blocks */
260-
div.twocol {
261-
padding-left: 0;
262-
padding-right: 0;
263-
display: flex;
264-
gap: 20px;
265-
}
266-
267-
div.twocol > div {
268-
flex-grow: 1;
269-
padding: 0;
270-
margin: 0;
271-
}
272-
273259
/* Fix selection of parameter names; remove when fixed in the theme
274260
* https://github.com/sphinx-doc/sphinx/pull/9763
275261
*/

doc/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,13 @@
7272
'sphinxext.skip_deprecated',
7373
'sphinxext.redirect_from',
7474
'sphinx_copybutton',
75-
'sphinx_panels',
75+
'sphinx_design',
7676
]
7777

7878
exclude_patterns = [
7979
'api/prev_api_changes/api_changes_*/*',
8080
]
8181

82-
panels_add_bootstrap_css = False
83-
8482

8583
def _check_dependencies():
8684
names = {

doc/index.rst

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ and interactive visualizations in Python.
1616
Installation
1717
************
1818

19-
.. container:: twocol
19+
.. grid:: 1 1 2 2
2020

21-
.. container::
21+
.. grid-item::
2222

2323
Install using `pip <https://pypi.org/project/matplotlib>`__:
2424

2525
.. code-block:: bash
2626
2727
pip install matplotlib
2828
29-
.. container::
29+
.. grid-item::
3030

3131
Install using `conda <https://docs.continuum.io/anaconda/>`__:
3232

@@ -41,46 +41,57 @@ Further details are available in the :doc:`Installation Guide <users/installing/
4141
Learning resources
4242
******************
4343

44-
.. panels::
44+
.. grid:: 1 1 2 2
4545

46-
Tutorials
47-
^^^^^^^^^
46+
.. grid-item-card::
47+
:class-header: sd-bg-light
48+
:padding: 2
4849

49-
- :doc:`Quick-start guide <tutorials/introductory/quick_start>`
50-
- :doc:`Plot types <plot_types/index>`
51-
- `Introductory tutorials <../tutorials/index.html#introductory>`_
52-
- :doc:`External learning resources <users/resources/index>`
50+
Tutorials
51+
^^^
5352

54-
---
53+
- :doc:`Quick-start guide <tutorials/introductory/quick_start>`
54+
- :doc:`Plot types <plot_types/index>`
55+
- `Introductory tutorials <../tutorials/index.html#introductory>`_
56+
- :doc:`External learning resources <users/resources/index>`
5557

56-
How-tos
57-
^^^^^^^
58-
- :doc:`Example gallery <gallery/index>`
59-
- :doc:`Matplotlib FAQ <users/faq/index>`
58+
.. grid-item-card::
59+
:class-header: sd-bg-light
60+
:padding: 2
6061

61-
---
62+
How-tos
63+
^^^
6264

63-
Understand how Matplotlib works
64-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65+
- :doc:`Example gallery <gallery/index>`
66+
- :doc:`Matplotlib FAQ <users/faq/index>`
6567

66-
- The :ref:`users-guide-explain` in the :doc:`Users guide <users/index>`
67-
- Many of the :ref:`Intermediate <tutorials-intermediate>` and
68-
:ref:`Advanced <tutorials-advanced>` tutorials
69-
have explanatory material
68+
.. grid-item-card::
69+
:class-header: sd-bg-light
70+
:padding: 2
7071

71-
---
72+
Understand how Matplotlib works
73+
^^^
7274

73-
Reference
74-
^^^^^^^^^
75+
- The :ref:`users-guide-explain` in the :doc:`Users guide
76+
<users/index>`
77+
- Many of the :ref:`Intermediate <tutorials-intermediate>` and
78+
:ref:`Advanced <tutorials-advanced>` tutorials have explanatory
79+
material
7580

76-
- :doc:`API Reference <api/index>`
77-
- :doc:`Axes API <api/axes_api>` for most plotting methods
78-
- :doc:`Figure API <api/figure_api>` for figure-level methods
79-
- Top-level interfaces to create:
81+
.. grid-item-card::
82+
:class-header: sd-bg-light
83+
:padding: 2
8084

81-
- Figures (`.pyplot.figure`)
82-
- Subplots (`.pyplot.subplots`, `.pyplot.subplot_mosaic`)
85+
Reference
86+
^^^
8387

88+
- :doc:`API Reference <api/index>`
89+
- :doc:`Axes API <api/axes_api>` for most plotting methods
90+
- :doc:`Figure API <api/figure_api>` for figure-level methods
91+
- Top-level interfaces to create:
92+
93+
- Figures (`.pyplot.figure`)
94+
- Subplots (`.pyplot.subplots`, `.pyplot.subplot_mosaic`)
8495

8596

8697
********************

doc/users/getting_started/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ Getting started
44
Installation quick-start
55
------------------------
66

7-
.. container:: twocol
7+
.. grid:: 1 1 2 2
88

9-
.. container::
9+
.. grid-item::
1010

1111
Install using `pip <https://pypi.org/project/matplotlib>`__:
1212

1313
.. code-block:: bash
1414
1515
pip install matplotlib
1616
17-
.. container::
17+
.. grid-item::
1818

1919
Install using `conda <https://docs.continuum.io/anaconda/>`__:
2020

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies:
3333
- sphinx>=1.8.1,!=2.0.0
3434
- sphinx-copybutton
3535
- sphinx-gallery>=0.10
36-
- sphinx-panels
36+
- sphinx-design
3737
- pip
3838
- pip:
3939
- mpl-sphinx-theme

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ mpl-sphinx-theme
1818
sphinxcontrib-svg2pdfconverter>=1.1.0
1919
sphinx-gallery>=0.10
2020
sphinx-copybutton
21-
sphinx-panels
21+
sphinx-design

0 commit comments

Comments
 (0)