Skip to content

Commit

Permalink
DOC: Migrate from sphinx-panels to sphinx-design
Browse files Browse the repository at this point in the history
The former has been deprecated for the latter.
  • Loading branch information
QuLogic committed May 31, 2022
1 parent 86b777b commit d9f7c16
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 53 deletions.
14 changes: 0 additions & 14 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,6 @@ table.property-table td {
width: 210px;
}

/* Two columns for install code blocks */
div.twocol {
padding-left: 0;
padding-right: 0;
display: flex;
gap: 20px;
}

div.twocol > div {
flex-grow: 1;
padding: 0;
margin: 0;
}

/* Fix selection of parameter names; remove when fixed in the theme
* https://github.com/sphinx-doc/sphinx/pull/9763
*/
Expand Down
4 changes: 1 addition & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,13 @@
'sphinxext.skip_deprecated',
'sphinxext.redirect_from',
'sphinx_copybutton',
'sphinx_panels',
'sphinx_design',
]

exclude_patterns = [
'api/prev_api_changes/api_changes_*/*',
]

panels_add_bootstrap_css = False


def _check_dependencies():
names = {
Expand Down
73 changes: 42 additions & 31 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ and interactive visualizations in Python.
Installation
************

.. container:: twocol
.. grid:: 1 1 2 2

.. container::
.. grid-item::

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

.. code-block:: bash
pip install matplotlib
.. container::
.. grid-item::

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

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

.. panels::
.. grid:: 1 1 2 2

Tutorials
^^^^^^^^^
.. grid-item-card::
:class-header: sd-bg-light
:padding: 2

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

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

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

---
How-tos
^^^

Understand how Matplotlib works
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- :doc:`Example gallery <gallery/index>`
- :doc:`Matplotlib FAQ <users/faq/index>`

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

---
Understand how Matplotlib works
^^^

Reference
^^^^^^^^^
- The :ref:`users-guide-explain` in the :doc:`Users guide
<users/index>`
- Many of the :ref:`Intermediate <tutorials-intermediate>` and
:ref:`Advanced <tutorials-advanced>` tutorials have explanatory
material

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

- Figures (`.pyplot.figure`)
- Subplots (`.pyplot.subplots`, `.pyplot.subplot_mosaic`)
Reference
^^^

- :doc:`API Reference <api/index>`
- :doc:`Axes API <api/axes_api>` for most plotting methods
- :doc:`Figure API <api/figure_api>` for figure-level methods
- Top-level interfaces to create:

- Figures (`.pyplot.figure`)
- Subplots (`.pyplot.subplots`, `.pyplot.subplot_mosaic`)


********************
Expand Down
6 changes: 3 additions & 3 deletions doc/users/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Getting started
Installation quick-start
------------------------

.. container:: twocol
.. grid:: 1 1 2 2

.. container::
.. grid-item::

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

.. code-block:: bash
pip install matplotlib
.. container::
.. grid-item::

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

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
- sphinx>=1.8.1,!=2.0.0
- sphinx-copybutton
- sphinx-gallery>=0.10
- sphinx-panels
- sphinx-design
- pip
- pip:
- mpl-sphinx-theme
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ mpl-sphinx-theme
sphinxcontrib-svg2pdfconverter>=1.1.0
sphinx-gallery>=0.10
sphinx-copybutton
sphinx-panels
sphinx-design

0 comments on commit d9f7c16

Please sign in to comment.