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

Skip to content

Commit ca6a289

Browse files
authored
Merge pull request #30460 from meeseeksmachine/auto-backport-of-pr-30451-on-v3.10.5-doc
Backport PR #30451 on branch v3.10.5-doc (doc: factor out quick install tab for reuse)
2 parents b17b062 + e44495f commit ca6a289

File tree

4 files changed

+65
-72
lines changed

4 files changed

+65
-72
lines changed

doc/index.rst

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,12 @@ and interactive visualizations.
1414
Install
1515
=======
1616

17-
.. tab-set::
18-
:class: sd-width-content-min
17+
.. include:: install/quick_install.inc.rst
1918

20-
.. tab-item:: pip
19+
.. toctree::
20+
:hidden:
2121

22-
.. code-block:: bash
23-
24-
pip install matplotlib
25-
26-
.. tab-item:: conda
27-
28-
.. code-block:: bash
29-
30-
conda install -c conda-forge matplotlib
31-
32-
.. tab-item:: pixi
33-
34-
.. code-block:: bash
35-
36-
pixi add matplotlib
37-
38-
.. tab-item:: uv
39-
40-
.. code-block:: bash
41-
42-
uv add matplotlib
43-
44-
.. warning::
45-
46-
If you install Python with ``uv`` then the ``tkagg`` backend
47-
will not be available because python-build-standalone (used by uv
48-
to distribute Python) does not contain tk bindings that are usable by
49-
Matplotlib (see `this issue`_ for details). If you want Matplotlib
50-
to be able to display plots in a window, you should install one of
51-
the other :ref:`supported GUI frameworks <optional_dependencies>`,
52-
e.g.
53-
54-
.. code-block:: bash
55-
56-
uv add matplotlib pyside6
57-
58-
.. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851
59-
60-
.. tab-item:: other
61-
62-
.. rst-class:: section-toc
63-
.. toctree::
64-
:maxdepth: 2
65-
66-
install/index
67-
68-
For more detailed instructions, see the
69-
:doc:`installation guide <install/index>`.
22+
install/index
7023

7124
Learn
7225
=====

doc/install/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
Installation
66
************
77

8+
.. include:: quick_install.inc.rst
9+
10+
.. _install-official:
811

912
Install an official release
1013
===========================
@@ -35,6 +38,7 @@ precompiled wheel for your OS and Python.
3538
animations and a larger selection of file formats, you can
3639
install :ref:`optional dependencies <optional_dependencies>`.
3740

41+
.. _install-third-party:
3842

3943
Third-party distributions
4044
=========================
@@ -81,7 +85,7 @@ you can install Matplotlib via your package manager, e.g.:
8185

8286
.. redirect-from:: /users/installing/installing_source
8387

84-
.. _install_from_source:
88+
.. _install-nightly-build:
8589

8690
Install a nightly build
8791
=======================
@@ -101,6 +105,7 @@ scientific-python-nightly-wheels as the package index to query:
101105
--extra-index-url https://pypi.org/simple \
102106
matplotlib
103107
108+
.. _install-source:
104109

105110
Install from source
106111
===================

doc/install/quick_install.inc.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.. set of quick install commands for reuse across docs
2+
3+
.. tab-set::
4+
:class: sd-width-content-min
5+
6+
.. tab-item:: pip
7+
8+
.. code-block:: bash
9+
10+
pip install matplotlib
11+
12+
.. tab-item:: conda
13+
14+
.. code-block:: bash
15+
16+
conda install -c conda-forge matplotlib
17+
18+
.. tab-item:: pixi
19+
20+
.. code-block:: bash
21+
22+
pixi add matplotlib
23+
24+
.. tab-item:: uv
25+
26+
.. code-block:: bash
27+
28+
uv add matplotlib
29+
30+
.. warning::
31+
32+
If you install Python with ``uv`` then the ``tkagg`` backend
33+
will not be available because python-build-standalone (used by uv
34+
to distribute Python) does not contain tk bindings that are usable by
35+
Matplotlib (see `this issue`_ for details). If you want Matplotlib
36+
to be able to display plots in a window, you should install one of
37+
the other :ref:`supported GUI frameworks <optional_dependencies>`,
38+
e.g.
39+
40+
.. code-block:: bash
41+
42+
uv add matplotlib pyside6
43+
44+
.. _this issue: https://github.com/astral-sh/uv/issues/6893#issuecomment-2565965851
45+
46+
.. tab-item:: other
47+
48+
:ref:`install-official`
49+
50+
:ref:`install-third-party`
51+
52+
:ref:`install-nightly-build`
53+
54+
:ref:`install-source`

doc/users/getting_started/index.rst

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,7 @@ Getting started
44
Installation quick-start
55
------------------------
66

7-
.. grid:: 1 1 2 2
8-
9-
.. grid-item::
10-
11-
Install using `pip <https://pypi.org/project/matplotlib>`__:
12-
13-
.. code-block:: bash
14-
15-
pip install matplotlib
16-
17-
.. grid-item::
18-
19-
Install using `conda <https://docs.continuum.io/anaconda/>`__:
20-
21-
.. code-block:: bash
22-
23-
conda install -c conda-forge matplotlib
24-
25-
Further details are available in the :doc:`Installation Guide </install/index>`.
26-
7+
.. include:: /install/quick_install.inc.rst
278

289
Draw a first plot
2910
-----------------

0 commit comments

Comments
 (0)