Skip to content

Fix PDF contents #21659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 1 addition & 91 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,91 +1 @@
############
Installation
############

==============================
Installing an official release
==============================

Matplotlib releases are available as wheel packages for macOS, Windows and
Linux on `PyPI <https://pypi.org/project/matplotlib/>`_. Install it using
``pip``:

.. code-block:: sh

python -m pip install -U pip
python -m pip install -U matplotlib

If this command results in Matplotlib being compiled from source and
there's trouble with the compilation, you can add ``--prefer-binary`` to
select the newest version of Matplotlib for which there is a
precompiled wheel for your OS and Python.

.. note::

The following backends work out of the box: Agg, ps, pdf, svg

Python is typically shipped with tk bindings which are used by
TkAgg.

For support of other GUI frameworks, LaTeX rendering, saving
animations and a larger selection of file formats, you can
install :ref:`optional_dependencies`.

=========================
Third-party distributions
=========================

Various third-parties provide Matplotlib for their environments.

Conda packages
==============
Matplotlib is available both via the *anaconda main channel*

.. code-block:: sh

conda install matplotlib

as well as via the *conda-forge community channel*

.. code-block:: sh

conda install -c conda-forge matplotlib

Python distributions
====================

Matplotlib is part of major Python distributions:

- `Anaconda <https://www.anaconda.com/>`_

- `ActiveState ActivePython
<https://www.activestate.com/products/python/downloads/>`_

- `WinPython <https://winpython.github.io/>`_

Linux package manager
=====================

If you are using the Python version that comes with your Linux distribution,
you can install Matplotlib via your package manager, e.g.:

* Debian / Ubuntu: ``sudo apt-get install python3-matplotlib``
* Fedora: ``sudo dnf install python3-matplotlib``
* Red Hat: ``sudo yum install python3-matplotlib``
* Arch: ``sudo pacman -S python-matplotlib``

======================
Installing from source
======================
See :ref:`install_from_source`.

==========================
Installing for development
==========================
See :ref:`installing_for_devs`.

==============
Installing FAQ
==============

See :ref:`installing-faq`.
See doc/users/installing/index.rst
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ various graphical user interface toolkits.
Install
=======

For installation instructions and requirements, see `INSTALL.rst <INSTALL.rst>`_ or the
`install <https://matplotlib.org/stable/users/installing.html>`_ documentation.
For installation instructions and requirements, see the `install documentation
<https://matplotlib.org/stable/users/installing/index.html>`_ or
`installing.rst <doc/users/installing/index.rst>`_ in the source.

Contribute
==========
Expand Down
10 changes: 6 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ def _check_dependencies():
# This is the default encoding, but it doesn't hurt to be explicit
source_encoding = "utf-8"

# The master toctree document.
master_doc = 'users/index'
# The toplevel toctree document (renamed to root_doc in Sphinx 4.0)
root_doc = master_doc = 'users/index'

# General substitutions.
try:
Expand Down Expand Up @@ -378,7 +378,7 @@ def _check_dependencies():
# document class [howto/manual])

latex_documents = [
('contents', 'Matplotlib.tex', 'Matplotlib',
(root_doc, 'Matplotlib.tex', 'Matplotlib',
'John Hunter\\and Darren Dale\\and Eric Firing\\and Michael Droettboom'
'\\and and the matplotlib development team', 'manual'),
]
Expand Down Expand Up @@ -461,6 +461,8 @@ def _check_dependencies():

# Additional stuff for the LaTeX preamble.
latex_elements['preamble'] = r"""
% Show Parts and Chapters in Table of Contents
\setcounter{tocdepth}{0}
% One line per author on title page
\DeclareRobustCommand{\and}%
{\end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}}%
Expand Down Expand Up @@ -508,7 +510,7 @@ def _check_dependencies():
autoclass_content = 'both'

texinfo_documents = [
("contents", 'matplotlib', 'Matplotlib Documentation',
(root_doc, 'matplotlib', 'Matplotlib Documentation',
'John Hunter@*Darren Dale@*Eric Firing@*Michael Droettboom@*'
'The matplotlib development team',
'Matplotlib', "Python plotting package", 'Programming',
Expand Down
6 changes: 3 additions & 3 deletions doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,22 +197,22 @@ Documents can be linked with the ``:doc:`` directive:

.. code-block:: rst

See the :doc:`/users/faq/installing_faq`
See the :doc:`/users/installing/index`

See the tutorial :doc:`/tutorials/introductory/usage`

See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`

will render as:

See the :doc:`/users/faq/installing_faq`
See the :doc:`/users/installing/index`

See the tutorial :doc:`/tutorials/introductory/usage`

See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`

Sections can also be given reference names. For instance from the
:doc:`/users/faq/installing_faq` link:
:doc:`/users/installing/index` link:

.. code-block:: rst

Expand Down
139 changes: 0 additions & 139 deletions doc/users/faq/installing_faq.rst

This file was deleted.

20 changes: 10 additions & 10 deletions doc/users/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
Users guide
###########

Tutorials and examples
######################

.. toctree::
:maxdepth: 1

../plot_types/index.rst
../tutorials/index.rst
../gallery/index.rst

General
#######

Expand All @@ -29,6 +19,16 @@ General
faq/index.rst
resources/index.rst

Tutorials and examples
######################

.. toctree::
:maxdepth: 1

../plot_types/index.rst
../tutorials/index.rst
../gallery/index.rst

Reference
#########

Expand Down
Loading