@@ -38,7 +38,7 @@ The following packages and tools are not required but extend the capabilities
3838of Matplotlib.
3939
4040Backends
41- ~~~~~~~~
41+ ^^^^^^^^
4242
4343Matplotlib figures can be rendered to various user interfaces. See
4444:ref: `what-is-a-backend ` for more details on the optional Matplotlib backends
@@ -73,14 +73,14 @@ and the capabilities they provide.
7373.. _ipykernel : https://pypi.org/project/ipykernel/
7474
7575Animations
76- ~~~~~~~~~~
76+ ^^^^^^^^^^
7777
7878* `ffmpeg <https://www.ffmpeg.org/ >`_: for saving movies.
7979* `ImageMagick <https://www.imagemagick.org/script/index.php >`_: for saving
8080 animated gifs.
8181
8282Font handling and rendering
83- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
83+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
8484
8585* `LaTeX <https://www.latex-project.org/ >`_ (with `cm-super
8686 <https://ctan.org/pkg/cm-super> `__ and `underscore
@@ -111,7 +111,7 @@ rasterize characters differently) and of Qhull. As an exception, Matplotlib
111111defaults to the system version of FreeType on AIX.
112112
113113Use system libraries
114- ~~~~~~~~~~~~~~~~~~~~
114+ ^^^^^^^^^^^^^^^^^^^^
115115
116116To force Matplotlib to use a copy of FreeType or Qhull already installed in
117117your system, create a :file: `mplsetup.cfg ` file with the following contents:
@@ -185,7 +185,7 @@ remember to clear your artifacts before re-building::
185185
186186
187187Manual Download
188- ~~~~~~~~~~~~~~~
188+ ^^^^^^^^^^^^^^^
189189
190190
191191If the automatic download does not work (for example on air-gapped systems) it
@@ -240,17 +240,65 @@ Setup dependencies
240240C++ compiler
241241------------
242242
243- Matplotlib requires a C++ compiler that supports C++11.
243+ Matplotlib requires a C++ compiler that supports C++11, and each platform has a
244+ development environment that must be installed before a compiler can be installed.
245+
246+ .. tab-set ::
247+
248+ .. tab-item :: Linux
249+
250+ On some Linux systems, you can install a meta-build package. For example,
251+ on Ubuntu ``apt install build-essential ``
252+
253+ Otherwise, use the system distribution's package manager to install
254+ :ref: `gcc <compiler-table >`.
255+
256+ .. tab-item :: macOS
257+
258+ Install `Xcode <https://developer.apple.com/xcode/ >`_ for Apple platform development.
259+
260+ .. tab-item :: Windows
261+
262+ Install `Visual Studio Build Tools <https://visualstudio.microsoft.com/downloads/?q=build+tools >`_
263+
264+ Make sure "Desktop development with C++" is selected, and that the latest MSVC,
265+ "C++ CMake tools for Windows," and a Windows SDK compatible with your version
266+ of Windows are selected and installed. They should be selected by default under
267+ the "Optional" subheading, but are required to build Matplotlib from source.
268+
269+ Alternatively, you can install a Linux-like environment such as `CygWin <https://www.cygwin.com/ >`_
270+ or `Windows Subsystem for Linux <https://learn.microsoft.com/en-us/windows/wsl/install >`_.
271+
272+
273+ We highly recommend that you install a compiler using your platform tool, i.e.,
274+ Xcode, VS Code or Linux package manager. Choose **one ** compiler from this list:
275+
276+ .. _compiler-table :
277+
278+ .. list-table ::
279+ :widths: 20 20 20 40
280+ :header-rows: 1
281+
282+ * - compiler
283+ - minimum version
284+ - platforms
285+ - notes
286+ * - GCC
287+ - **4.8.1 **
288+ - Linux, macOS, Windows
289+ - `gcc 4.8.1 <https://gcc.gnu.org/projects/cxx-status.html#cxx11 >`_,
290+ `GCC: Binaries <https://gcc.gnu.org/install/binaries.html >`_,
291+
292+ For gcc <6.5 you will need to set ``$CFLAGS=-std=c++11 `` to enable C++11 support.
293+ * - Clang (LLVM)
294+ - **3.3 **
295+ - Linux, macOS
296+ - `clang 3.3 <https://clang.llvm.org/cxx_status.html >`_, `LLVM <https://releases.llvm.org/download.html >`_
297+ * - MSVC++
298+ - **14.0 **
299+ - Windows
300+ - `Visual Studio 2015 C++ <https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-140 >`_
244301
245- - `gcc 4.8.1 <https://gcc.gnu.org/projects/cxx-status.html#cxx11 >`_ or higher. For gcc <6.5 you will
246- need to set ``$CFLAGS=-std=c++11 `` to enable C++11 support.
247- `Installing GCC: Binaries <https://gcc.gnu.org/install/binaries.html >`_.
248- - `clang 3.3 <https://clang.llvm.org/cxx_status.html >`_ or higher.
249- `LLVM Download Page <https://releases.llvm.org/download.html >`_.
250- - `Visual Studio 2015
251- <https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-140> `_
252- (aka VS 14.0) or higher. A free version of Build Tools for Visual Studio is available for
253- `download <https://visualstudio.microsoft.com/downloads/?q=build+tools >`_.
254302
255303
256304.. _test-dependencies :
@@ -286,8 +334,8 @@ testing the following will be used if they are installed.
286334 fonts for testing font fallback and non-western fonts
287335- xarray _ used to test compatibility with xarray
288336
289- If any of these dependencies are not discovered the tests that rely on them
290- will be skipped by pytest.
337+ If any of these dependencies are not discovered, then the tests that rely on
338+ them will be skipped by pytest.
291339
292340.. note ::
293341
0 commit comments